mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
plugins update
This commit is contained in:
@ -256,7 +256,7 @@ endfunction
|
||||
function! s:Bookmark.open(nerdtree, ...)
|
||||
let opts = a:0 ? a:1 : {}
|
||||
|
||||
if and(g:NERDTreeQuitOnOpen,2)
|
||||
if nerdtree#and(g:NERDTreeQuitOnOpen,2)
|
||||
call a:nerdtree.ui.toggleShowBookmarks()
|
||||
endif
|
||||
|
||||
|
@ -66,7 +66,7 @@ endfunction
|
||||
"FUNCTION: s:NERDTree.CloseIfQuitOnOpen() {{{1
|
||||
"Closes the NERD tree window if the close on open option is set
|
||||
function! s:NERDTree.CloseIfQuitOnOpen()
|
||||
if and(g:NERDTreeQuitOnOpen,1) && s:NERDTree.IsOpen()
|
||||
if nerdtree#and(g:NERDTreeQuitOnOpen,1) && s:NERDTree.IsOpen()
|
||||
call s:NERDTree.Close()
|
||||
endif
|
||||
endfunction
|
||||
|
@ -432,7 +432,7 @@ function! s:TreeDirNode._initChildren(silent)
|
||||
|
||||
call self.sortChildren()
|
||||
|
||||
redraw!
|
||||
call nerdtree#echo("")
|
||||
|
||||
if invalidFilesFound
|
||||
call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree")
|
||||
|
@ -280,11 +280,10 @@ endfunction
|
||||
|
||||
" FUNCTION: s:UI._indentLevelFor(line) {{{1
|
||||
function! s:UI._indentLevelFor(line)
|
||||
" have to do this work around because match() returns bytes, not chars
|
||||
let numLeadBytes = match(a:line, '\M\[^ '.g:NERDTreeDirArrowExpandable.g:NERDTreeDirArrowCollapsible.']')
|
||||
" The next line is a backward-compatible workaround for strchars(a:line(0:numLeadBytes-1]). strchars() is in 7.3+
|
||||
let leadChars = len(split(a:line[0:numLeadBytes-1], '\zs'))
|
||||
|
||||
" Replace multi-character DirArrows with a single space so the
|
||||
" indentation calculation doesn't get messed up.
|
||||
let l:line = substitute(substitute(a:line, '\V'.g:NERDTreeDirArrowExpandable, ' ', ''), '\V'.g:NERDTreeDirArrowCollapsible, ' ', '')
|
||||
let leadChars = match(l:line, '\M\[^ ]')
|
||||
return leadChars / s:UI.IndentWid()
|
||||
endfunction
|
||||
|
||||
|
Reference in New Issue
Block a user