Compare commits

..

3 Commits

Author SHA1 Message Date
Max Coplan
690d061b59 chore: fix typo in README (#1439)
Some checks failed
Vint / vint (push) Has been cancelled
2025-09-26 19:37:39 +03:30
rzvxa
0b3c1dc0fa fix: emit init notification on fs menu's add file (#1447) 2025-09-26 19:35:22 +03:30
inzeets
915f64b3be fix: emit init notifications on new and transplanted children (#1438) 2025-09-26 19:29:35 +03:30
3 changed files with 4 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ After installing NERDTree, the best way to learn it is to turn on the Quick Help
NERDTree can be extended with custom mappings and functions using its built-in API. The details of this API are described in the included documentation. Several plugins have been written, and are available on Github for installation like any other plugin. The plugins in this list are maintained (or not) by their respective owners, and certain combinations may be incompatible. NERDTree can be extended with custom mappings and functions using its built-in API. The details of this API are described in the included documentation. Several plugins have been written, and are available on Github for installation like any other plugin. The plugins in this list are maintained (or not) by their respective owners, and certain combinations may be incompatible.
* [Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin): Shows Git status flags for files and folders in NERDTree. * [Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin): Shows Git status flags for files and folders in NERDTree.
* [ryanoasis/vim-devicons](https://github.com/ryanoasis/vim-devicons): Adds filetype-specific icons to NERDTree files and folders, * [ryanoasis/vim-devicons](https://github.com/ryanoasis/vim-devicons): Adds filetype-specific icons to NERDTree files and folders.
* [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight): Adds syntax highlighting to NERDTree based on filetype. * [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight): Adds syntax highlighting to NERDTree based on filetype.
* [scrooloose/nerdtree-project-plugin](https://github.com/scrooloose/nerdtree-project-plugin): Saves and restores the state of the NERDTree between sessions. * [scrooloose/nerdtree-project-plugin](https://github.com/scrooloose/nerdtree-project-plugin): Saves and restores the state of the NERDTree between sessions.
* [PhilRunninger/nerdtree-buffer-ops](https://github.com/PhilRunninger/nerdtree-buffer-ops): 1) Highlights open files in a different color. 2) Closes a buffer directly from NERDTree. * [PhilRunninger/nerdtree-buffer-ops](https://github.com/PhilRunninger/nerdtree-buffer-ops): 1) Highlights open files in a different color. 2) Closes a buffer directly from NERDTree.

View File

@@ -591,6 +591,7 @@ function! s:TreeDirNode.refresh()
let newNode = g:NERDTreeFileNode.New(path, self.getNerdtree()) let newNode = g:NERDTreeFileNode.New(path, self.getNerdtree())
let newNode.parent = self let newNode.parent = self
call add(newChildNodes, newNode) call add(newChildNodes, newNode)
call g:NERDTreePathNotifier.NotifyListeners('init', newNode.path, newNode.getNerdtree(), {})
endif endif
catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/ catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/
let invalidFilesFound += 1 let invalidFilesFound += 1
@@ -715,6 +716,7 @@ function! s:TreeDirNode.transplantChild(newNode)
break break
endif endif
endfor endfor
call self.refresh()
endfunction endfunction
" vim: set sw=4 sts=4 et fdm=marker: " vim: set sw=4 sts=4 et fdm=marker:

View File

@@ -211,6 +211,7 @@ function! NERDTreeAddNode()
call b:NERDTree.render() call b:NERDTree.render()
elseif parentNode.isOpen || !empty(parentNode.children) elseif parentNode.isOpen || !empty(parentNode.children)
call parentNode.addChild(newTreeNode, 1) call parentNode.addChild(newTreeNode, 1)
call g:NERDTreePathNotifier.NotifyListeners('init', newTreeNode.path, newTreeNode.getNerdtree(), {})
call NERDTreeRender() call NERDTreeRender()
call newTreeNode.putCursorHere(1, 0) call newTreeNode.putCursorHere(1, 0)
endif endif