mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 20:40:59 +08:00
only attempt to open marks file if it exists
This commit is contained in:
parent
140deac284
commit
995f7faec3
|
@ -1439,14 +1439,16 @@ endfunction
|
||||||
|
|
||||||
" Function: s:ReadMarks() {{{2
|
" Function: s:ReadMarks() {{{2
|
||||||
function! s:ReadMarks()
|
function! s:ReadMarks()
|
||||||
let marks = s:GetMarks()
|
if filereadable(g:NERDTreeMarksFile)
|
||||||
let markStrings = readfile(g:NERDTreeMarksFile)
|
let marks = s:GetMarks()
|
||||||
for i in markStrings
|
let markStrings = readfile(g:NERDTreeMarksFile)
|
||||||
let key = substitute(i, '^\(\w.\{-}\) .*$', '\1', '')
|
for i in markStrings
|
||||||
let path = substitute(i, '^\w.\{-} \(.*\)$', '\1', '')
|
let key = substitute(i, '^\(\w.\{-}\) .*$', '\1', '')
|
||||||
let marks[key] = s:oPath.New(path)
|
let path = substitute(i, '^\w.\{-} \(.*\)$', '\1', '')
|
||||||
endfor
|
let marks[key] = s:oPath.New(path)
|
||||||
call s:RenderView()
|
endfor
|
||||||
|
call s:RenderView()
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
" Function: s:TreeExistsForTab() {{{2
|
" Function: s:TreeExistsForTab() {{{2
|
||||||
" Returns 1 if a nerd tree root exists in the current tab
|
" Returns 1 if a nerd tree root exists in the current tab
|
||||||
|
|
Loading…
Reference in New Issue
Block a user