Fix lint warnings: use the full option name

This commit is contained in:
Caleb Maclennan 2019-12-31 09:40:39 +03:00
parent 38b1e5e7aa
commit 907587f7a3
4 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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
@ -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
@ -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

View File

@ -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
@ -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: