Skip to content

Commit

Permalink
Remove unused getlines.
Browse files Browse the repository at this point in the history
  • Loading branch information
autozimu committed Apr 14, 2018
1 parent 99db72c commit d690d2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 5 additions & 1 deletion autoload/LanguageClient.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ function! s:Expand(exp) abort
endfunction

function! s:Text() abort
return getbufline('', 1, '$') + (&fixendofline ? [''] : [])
let l:lines = getline(1, '$')
if l:lines[-1] !=# '' && &fixendofline
let l:lines += ['']
endif
return l:lines
endfunction

" Get all listed buffer file names.
Expand Down
11 changes: 0 additions & 11 deletions src/vim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,6 @@ pub trait IVim {
self.command(cmd)
}

fn getlines<P: AsRef<Path>>(&self, bufexp: P) -> Result<Vec<String>> {
let bufexp = bufexp.as_ref().to_string_lossy();
let mut lines: Vec<String> = self.call(None, "getbufline", json!([bufexp, 1, '$']))?;
if lines.last().map(String::is_empty) == Some(false)
&& self.eval::<_, u8>("&fixendofline")? == 1
{
lines.push("".to_owned());
}
Ok(lines)
}

fn goto_location<P: AsRef<Path>>(
&self,
goto_cmd: &Option<String>,
Expand Down

0 comments on commit d690d2b

Please sign in to comment.