Skip to content

Commit

Permalink
Fix lint warnings: use the full option name
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 31, 2019
1 parent 38b1e5e commit 907587f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions autoload/nerdtree.vim
Expand Up @@ -165,12 +165,12 @@ endfunction
" FUNCTION: nerdtree#exec(cmd, ignoreAll) {{{2
" Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration
function! nerdtree#exec(cmd, ignoreAll) abort
let old_ei = &ei
let old_ei = &eventignore
if a:ignoreAll
set ei=all
set eventignore=all
endif
exec a:cmd
let &ei = old_ei
let &eventignore = old_ei
endfunction

" FUNCTION: nerdtree#has_opt(options, name) {{{2
Expand Down
2 changes: 1 addition & 1 deletion lib/nerdtree/bookmark.vim
Expand Up @@ -292,7 +292,7 @@ endfunction
" Get the string that should be rendered in the view for this bookmark
function! s:Bookmark.str()
let pathStrMaxLen = winwidth(g:NERDTree.GetWinNum()) - 4 - strdisplaywidth(self.name)
if &nu
if &number
let pathStrMaxLen = pathStrMaxLen - &numberwidth
endif

Expand Down
12 changes: 6 additions & 6 deletions lib/nerdtree/creator.vim
Expand Up @@ -300,11 +300,11 @@ function! s:Creator._setCommonBufOptions()
setlocal nowrap

if g:NERDTreeShowLineNumbers
setlocal nu
setlocal number
else
setlocal nonu
setlocal nonumber
if v:version >= 703
setlocal nornu
setlocal norelativenumber
endif
endif

Expand All @@ -330,8 +330,8 @@ endfunction
" FUNCTION: s:Creator._tabpagevar(tabnr, var) {{{1
function! s:Creator._tabpagevar(tabnr, var)
let currentTab = tabpagenr()
let old_ei = &ei
set ei=all
let old_ei = &eventignore
set eventignore=all

exec 'tabnext ' . a:tabnr
let v = -1
Expand All @@ -340,7 +340,7 @@ function! s:Creator._tabpagevar(tabnr, var)
endif
exec 'tabnext ' . currentTab

let &ei = old_ei
let &eventignore = old_ei

return v
endfunction
Expand Down
10 changes: 5 additions & 5 deletions plugin/NERD_tree.vim
Expand Up @@ -22,9 +22,9 @@ if v:version < 703
endif
let loaded_nerd_tree = 1

"for line continuation - i.e dont want C in &cpo
let s:old_cpo = &cpo
set cpo&vim
"for line continuation - i.e dont want C in &cpoptions
let s:old_cpo = &cpoptions
set cpoptions&vim

"Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The
Expand Down Expand Up @@ -255,7 +255,7 @@ endfunction
" SECTION: Post Source Actions {{{1
call nerdtree#postSourceActions()

"reset &cpo back to users setting
let &cpo = s:old_cpo
"reset &cpoptions back to users setting
let &cpoptions = s:old_cpo

" vim: set sw=4 sts=4 et fdm=marker:

0 comments on commit 907587f

Please sign in to comment.