mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 09:41:03 +08:00
Fix lint warnings: use the full option name
This commit is contained in:
parent
38b1e5e7aa
commit
907587f7a3
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user