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 " FUNCTION: nerdtree#exec(cmd, ignoreAll) {{{2
" Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration " Same as :exec cmd but, if ignoreAll is TRUE, set eventignore=all for the duration
function! nerdtree#exec(cmd, ignoreAll) abort function! nerdtree#exec(cmd, ignoreAll) abort
let old_ei = &ei let old_ei = &eventignore
if a:ignoreAll if a:ignoreAll
set ei=all set eventignore=all
endif endif
exec a:cmd exec a:cmd
let &ei = old_ei let &eventignore = old_ei
endfunction endfunction
" FUNCTION: nerdtree#has_opt(options, name) {{{2 " 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 " Get the string that should be rendered in the view for this bookmark
function! s:Bookmark.str() function! s:Bookmark.str()
let pathStrMaxLen = winwidth(g:NERDTree.GetWinNum()) - 4 - strdisplaywidth(self.name) let pathStrMaxLen = winwidth(g:NERDTree.GetWinNum()) - 4 - strdisplaywidth(self.name)
if &nu if &number
let pathStrMaxLen = pathStrMaxLen - &numberwidth let pathStrMaxLen = pathStrMaxLen - &numberwidth
endif endif

View File

@@ -300,11 +300,11 @@ function! s:Creator._setCommonBufOptions()
setlocal nowrap setlocal nowrap
if g:NERDTreeShowLineNumbers if g:NERDTreeShowLineNumbers
setlocal nu setlocal number
else else
setlocal nonu setlocal nonumber
if v:version >= 703 if v:version >= 703
setlocal nornu setlocal norelativenumber
endif endif
endif endif
@@ -330,8 +330,8 @@ endfunction
" FUNCTION: s:Creator._tabpagevar(tabnr, var) {{{1 " FUNCTION: s:Creator._tabpagevar(tabnr, var) {{{1
function! s:Creator._tabpagevar(tabnr, var) function! s:Creator._tabpagevar(tabnr, var)
let currentTab = tabpagenr() let currentTab = tabpagenr()
let old_ei = &ei let old_ei = &eventignore
set ei=all set eventignore=all
exec 'tabnext ' . a:tabnr exec 'tabnext ' . a:tabnr
let v = -1 let v = -1
@@ -340,7 +340,7 @@ function! s:Creator._tabpagevar(tabnr, var)
endif endif
exec 'tabnext ' . currentTab exec 'tabnext ' . currentTab
let &ei = old_ei let &eventignore = old_ei
return v return v
endfunction endfunction

View File

@@ -22,9 +22,9 @@ if v:version < 703
endif endif
let loaded_nerd_tree = 1 let loaded_nerd_tree = 1
"for line continuation - i.e dont want C in &cpo "for line continuation - i.e dont want C in &cpoptions
let s:old_cpo = &cpo let s:old_cpo = &cpoptions
set cpo&vim set cpoptions&vim
"Function: s:initVariable() function {{{2 "Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The "This function is used to initialise a given variable to a given value. The
@@ -255,7 +255,7 @@ endfunction
" SECTION: Post Source Actions {{{1 " SECTION: Post Source Actions {{{1
call nerdtree#postSourceActions() call nerdtree#postSourceActions()
"reset &cpo back to users setting "reset &cpoptions back to users setting
let &cpo = s:old_cpo let &cpoptions = s:old_cpo
" vim: set sw=4 sts=4 et fdm=marker: " vim: set sw=4 sts=4 et fdm=marker: