Skip to content

Commit caddec9

Browse files
inzeetsrzvxa
authored andcommitted
NERDTree is not notifying listeners on new file creation and child transplanting
1 parent b4b4130 commit caddec9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/nerdtree/tree_dir_node.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ function! s:TreeDirNode.refresh()
591591
let newNode = g:NERDTreeFileNode.New(path, self.getNerdtree())
592592
let newNode.parent = self
593593
call add(newChildNodes, newNode)
594+
call g:NERDTreePathNotifier.NotifyListeners('init', newNode.path, newNode.getNerdtree(), {})
594595
endif
595596
catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/
596597
let invalidFilesFound += 1
@@ -715,6 +716,7 @@ function! s:TreeDirNode.transplantChild(newNode)
715716
break
716717
endif
717718
endfor
719+
call self.refresh()
718720
endfunction
719721

720722
" vim: set sw=4 sts=4 et fdm=marker:

0 commit comments

Comments
 (0)