mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 10:55:15 +08:00
Don't ignore events when opening renamed files.
This commit is contained in:
parent
5fbf0d7dba
commit
3a3636b7cb
|
@ -141,12 +141,12 @@ function! s:renameBuffer(bufNum, newNodeName, isDirectory)
|
|||
let editStr = g:NERDTreePath.New(a:newNodeName).str({'format': 'Edit'})
|
||||
endif
|
||||
" 1. ensure that a new buffer is loaded
|
||||
call nerdtree#exec('badd ' . quotedFileName, 1)
|
||||
call nerdtree#exec('badd ' . quotedFileName, 0)
|
||||
" 2. ensure that all windows which display the just deleted filename
|
||||
" display a buffer for a new filename.
|
||||
let s:originalTabNumber = tabpagenr()
|
||||
let s:originalWindowNumber = winnr()
|
||||
call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 1)
|
||||
call nerdtree#exec('tabdo windo if winbufnr(0) ==# ' . a:bufNum . " | exec ':e! " . editStr . "' | endif", 0)
|
||||
call nerdtree#exec('tabnext ' . s:originalTabNumber, 1)
|
||||
call nerdtree#exec(s:originalWindowNumber . 'wincmd w', 1)
|
||||
" 3. We don't need a previous buffer anymore
|
||||
|
|
Loading…
Reference in New Issue
Block a user