Compare commits

..

9 Commits
5.2.0 ... 5.2.7

Author SHA1 Message Date
Phil Runninger
4ac07f52a3 Use :mode only in neovim. MacVim still needs to use :redraw! (#1019)
* Use :mode only in neovim. MacVim still needs to use :redraw!

* Make nerdtree#redraw do both redraw and redraw! based on a parameter.

* Make bang a required parameter.

* Replace all redraw statments with call nerdtree#redraw function calls.

* Update version in change log.
2019-07-10 09:45:58 -04:00
Phil Runninger (mac)
2f0d48d632 Update version in change log. 2019-07-07 03:53:06 -04:00
Phil Runninger
a460d6ef7f In CHANGELOG.md and PR template, make reference to PR a true HTML link. (#1017) 2019-07-07 03:50:59 -04:00
Phil Runninger
3b1a850b85 Use :mode instead of :redraw! when updating menu. (#1016)
* Use :mode instead of :redraw! when updating screen.

In neovim, it will actually clear the whole screen, whereas, redraw!
does not.

* Update version number in change log.
2019-07-07 03:19:17 -04:00
Phil Runninger
89a1a4355b When searching for root line num, stop at the end of the file. (#1015)
* When searching for root line num, stop at the end of the file.

When using the following NERDTreeStatusLine, Vim would lock up and not
work anymore. The problem was that when trying to find the root line
number, the loop was continuing past the end of the file, looping
"forever". The fix was to simply stop at the end of the file.

let g:NERDTreeStatusline = "%{exists('g:NERDTreeFileNode')&&" .
      \ "has_key(g:NERDTreeFileNode.GetSelected(),'path')?" .
      \ "g:NERDTreeFileNode.GetSelected().path.getLastPathComponent(0):''}"

* Update change log.
2019-07-04 00:21:50 -04:00
Phil Runninger
62b78de367 Update Change Log 2019-07-03 11:12:21 -04:00
Kebin Liu
aef6baf6e2 Update ui_glue.vim (#1014)
Fix `<CR>` key map on the bookmark
2019-07-03 11:11:25 -04:00
Phil Runninger
06c9d9c963 Make Enter work on the .. ( up a dir ) line (#1013)
* Make Enter work on the `.. ( up a dir )` line.

* Simpler instructions for getting bug info.

* Update changelog.
2019-07-02 15:45:36 -04:00
Phil Runninger
ca16df25fa Fix nerdtree#version() on Windows. 2019-07-01 23:29:56 -04:00
8 changed files with 168 additions and 131 deletions

View File

@@ -22,9 +22,8 @@ After reading, and before submitting your issue, please remove this introductory
#### Environment (for bug reports)
- [ ] Operating System:
- [ ] Vim/Neovim version `:version`:
- [ ] NERDTree version `:echo nerdtree#version(0)` or `git rev-parse --short HEAD`:
- [ ] A link to my [vimrc](), or
- [ ] Vim/Neovim version `:echo v:version`:
- [ ] NERDTree version, found on 1st line in NERDTree quickhelp `?`:
- [ ] vimrc settings
- [ ] NERDTree variables
```vim

View File

@@ -12,9 +12,9 @@ Closes # <!-- Issue number this PR addresses. If none, remove this line. -->
- [ ] Update [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), following this format/example:
```
#### MAJOR.MINOR...
- **.PATCH**: PR Title (Author) #PR Number
- **.PATCH**: PR Title (Author) [#PR Number](link to PR)
#### 5.1...
- **.1**: Update Changelog and create PR Template (PhilRunninger) #1007
- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007)
- **.0**: Too many changes for one patch...
```

View File

@@ -1,125 +1,132 @@
# Change Log
#### 5.2...
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) #1011
- **.7**: Use :mode only in neovim. MacVim still needs to use :redraw! [#1019](https://github.com/scrooloose/nerdtree/pull/1019)
- **.6**: In CHANGELOG.md and PR template, make reference to PR a true HTML link. [#1017](https://github.com/scrooloose/nerdtree/pull/1017)
- **.5**: Use `:mode` instead of `:redraw!` when updating menu. (PhilRunninger) [#1016](https://github.com/scrooloose/nerdtree/pull/1016)
- **.4**: When searching for root line num, stop at end of file. (PhilRunninger) [#1015](https://github.com/scrooloose/nerdtree/pull/1015)
- **.3**: Fix `<CR>` key map on the bookmark (lkebin) [#1014](https://github.com/scrooloose/nerdtree/pull/1014)
- **.2**: Make Enter work on the `.. ( up a dir )` line (PhilRunninger) [#1013](https://github.com/scrooloose/nerdtree/pull/1013)
- **.1**: Fix nerdtree#version() on Windows. (PhilRunninger)
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) [#1011](https://github.com/scrooloose/nerdtree/pull/1011)
#### 5.1...
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) #1009
- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) #1008
- **.1**: Update Changelog and create PR Template (PhilRunninger) #1007
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) [#1009](https://github.com/scrooloose/nerdtree/pull/1009)
- **.2**: Fix NERDTree opening with the wrong size. (PhilRunninger) [#1008](https://github.com/scrooloose/nerdtree/pull/1008)
- **.1**: Update Changelog and create PR Template (PhilRunninger) [#1007](https://github.com/scrooloose/nerdtree/pull/1007)
- **.0**: Too many changes for one patch...
- Refresh a dir_node if the file wasn't found in it, and look once more. (PhilRunninger) #1005
- Add a "copy path to clipboard" menu option (PhilRunninger) #1002
- Enable root refresh on "vim ." a different way than #999. (PhilRunninger) #1001
- Fix refreshroot (PhilRunninger) #999
- Change version check to look for 703 not 730 (vhalis) #994
- Change minimum vim (PhilRunninger) #991
- Allow multi-character DirArrows (PhilRunninger) #985
- Remove redraw! while still clearing last message empty string. (PhilRunninger) #979
- fix _initChildren function value set to numChildrenCached error (terryding77) #969
- On Windows, do a case-insensitive comparison of paths. (PhilRunninger) #967
- Remove the "Please wait... DONE" messages. (PhilRunninger) #966
- Smarter delimiter default (PhilRunninger) #963
- Update directory .vimdc readme example (spencerdcarlson) #961
- Preview bookmarks (PhilRunninger) #956
- Add new value to NERDTreeQuitOnOpen to close bookmark table (PhilRunninger) #955
- Add an :EditBookmarks command to edit the bookmarks file (PhilRunninger) #954
- Before copying, turn off &shellslash. Restore after copy is finished. (PhilRunninger) #952
- Set a maximum window size when zooming. (PhilRunninger) #950
- Confirm the wipeout of a unsaved buffer whose file has been renamed. (PhilRunninger) #949
- Escape a backslash so it can be used in a key mapping. (PhilRunninger) #948
- Add a NERDTreeMinimalMenu feature (tuzz) #938
- fixed root path error for windows (zcodes) #935
- Restore getDirChildren for use in nerdtree-project-plugin. (PhilRunninger) #929
- Document NERDTreeNodeDelimiter #912 (PhilRunninger) #926
- Allow modification of menu keybindings (Leandros) #923
- Add two more disqualifications for isCascadable(). (PhilRunninger) #914
- Allow highlighting more than one flag. (kristijanhusak) #908
- Support sorting files and directories by modification time. (PhilRunninger) #901
- Parse . and .. from path string with trailing slash. (PhilRunninger) #899
- Force sort to recalculate the cached sortKey. (PhilRunninger) #898
- Add NERDTreeRefreshRoot command (wgfm) #897
- Call Resolve on the file's path when calling :NERDTreeFind. (PhilRunninger) #896
- Catch all errors, not just NERDTree errors. (PhilRunninger) #894
- Fix typo in help file (lvoisin) #892
- Make NERDTreeCreator set the `'nolist'` option (lifecrisis) #889
- Refresh buffers after `m`, `m` operation on a folder (PhilRunninger) #888
- Use a better arg for FINDSTR when using the m,l command in Windows. (PhilRunninger) #887
- Fix the <C-J>/<C-K> motions, which currently fail with cascades (lifecrisis) #886
- Function "s:UI.getLineNum()" doesn't always work on cascades. (lifecrisis) #882
- NERDTreeCWD: reset CWD if changed by NERDTreeFocus (PhilRunninger) #878
- Use <count>tabnext instead of <count>gt to allow users to remap gt. (PhilRunninger) #877
- Do a case sensitive comparison of new/existing buffers. (PhilRunninger) #875
- Fix opening sub-directories that have commas in their name. (PhilRunninger) #873
- Add new command to open NERDTree in the root of a VCS repository. (PhilRunninger) #872
- Make sure the path to the bookmarks file exists before writing it. (PhilRunninger) #871
- Unzoom NERDTree when opening a file (PhilRunninger) #870
- Support unusual characters in file and directory names (PhilRunninger) #868
- Reword renamed-buffer prompt to be more clear (aflock) #867
- Default to placing cursor on root when closing bookmark table (lifecrisis) #866
- Fix issues with sorting of nodes (PhilRunninger) #856
- Better OSX detection (bubba-h57) #853
- Bugfix - ensure keymaps dictionary exists before using it (mnussbaum) #852
- Decrease startup-time by avoiding linear-time iteration over key mappings (mnussbaum) #851
- Add code to sort mappings in quickhelp (lifecrisis) #849
- Use ":clearjumps" in new NERDTree windows (lifecrisis) #844
- Like m-c did before, create parent directories if needed on m-m. (PhilRunninger) #840
- BUGFIX: Repair a problem with the `'u'` mapping. (lifecrisis) #838
- Make the NERDTree buffer writable when rendering it. (PhilRunninger) #837
- Code cleanup: Remove unsupported bookmark table mappings (lifecrisis) #835
- Replace strcharpart() with substitute() for backward compatibility (bravestarr) #834
- Fixed error `unknown function strcharpart` for older versions of Vim (hav4ik) #833
- Clear output when NERDTree menu is aborted (lifecrisis) #832
- Display a path with multi-byte characters correctly when it is truncated (bravestarr) #830
- Support revealing file and executing file with xdg-open for Linux (ngnmhieu) #824
- If node isn't open, count children on disk before deleting. (PhilRunninger) #822
- Add new variable g:NERDTreeRemoveFileCmd (kutsan) #816
- Use a better check for existence of the NERDTree buffer. (PhilRunninger) #814
- Fix focussing previous buffer when closing NERDTree (mrubli) #801
- Update the docs for "NERDTreeStatusline" (lifecrisis) #796
- BUGFIX: Unstable behavior in the "getPath()" method (lifecrisis) #795
- Revert the bugfix from pull request #785 (lifecrisis) #794
- BUGFIX: Allow ":NERDTreeFind" to discover hidden files (lifecrisis) #786
- BUGFIX: Allow ":NERDTreeFind" to reveal new files (lifecrisis) #785
- Add modelines (lifecrisis) #782
- Change the type of completion used by NERDTreeFind (lifecrisis) #781
- change NERDTreeFind with args (zhenyangze) #778
- Style Choice: Using confirm() when deleting a bookmark (lifecrisis) #777
- remove useless substitute when `file =~# "/$"` (skyblueee) #773
- remove useless removeLeadingSpaces in _stripMarkup (skyblueee) #772
- Make the "o" mapping consistent with "x" (lifecrisis) #769
- Fix a problem with the "x" handler (lifecrisis) #768
- Clean up the handler for the "x" mapping (lifecrisis) #767
- Revert change to tab opening method (lifecrisis) #766
- BUGFIX: Add back support for "b:NERDTreeRoot" (lifecrisis) #765
- Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) #759
- Update doc with already existing mapping variables (asnr) #699
- Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) #696
- Correct NERDTreeIgnore pattern in doc (cntoplolicon) #648
- Remove empty segments when splitting path (sooth-sayer) #574
- Suppress autocmds less agressively (wincent) #578 #691
- Refresh a dir_node if the file wasn't found in it, and look once more. (PhilRunninger) [#1005](https://github.com/scrooloose/nerdtree/pull/1005)
- Add a "copy path to clipboard" menu option (PhilRunninger) [#1002](https://github.com/scrooloose/nerdtree/pull/1002)
- Enable root refresh on "vim ." a different way than [#999](https://github.com/scrooloose/nerdtree/pull/999). (PhilRunninger) [#1001](https://github.com/scrooloose/nerdtree/pull/1001)
- Fix refreshroot (PhilRunninger) [#999](https://github.com/scrooloose/nerdtree/pull/999)
- Change version check to look for 703 not 730 (vhalis) [#994](https://github.com/scrooloose/nerdtree/pull/994)
- Change minimum vim (PhilRunninger) [#991](https://github.com/scrooloose/nerdtree/pull/991)
- Allow multi-character DirArrows (PhilRunninger) [#985](https://github.com/scrooloose/nerdtree/pull/985)
- Remove redraw! while still clearing last message empty string. (PhilRunninger) [#979](https://github.com/scrooloose/nerdtree/pull/979)
- fix `_initChildren` function value set to numChildrenCached error (terryding77) [#969](https://github.com/scrooloose/nerdtree/pull/969)
- On Windows, do a case-insensitive comparison of paths. (PhilRunninger) [#967](https://github.com/scrooloose/nerdtree/pull/967)
- Remove the **Please wait... DONE** messages. (PhilRunninger) [#966](https://github.com/scrooloose/nerdtree/pull/966)
- Smarter delimiter default (PhilRunninger) [#963](https://github.com/scrooloose/nerdtree/pull/963)
- Update directory .vimdc readme example (spencerdcarlson) [#961](https://github.com/scrooloose/nerdtree/pull/961)
- Preview bookmarks (PhilRunninger) [#956](https://github.com/scrooloose/nerdtree/pull/956)
- Add new value to NERDTreeQuitOnOpen to close bookmark table (PhilRunninger) [#955](https://github.com/scrooloose/nerdtree/pull/955)
- Add an :EditBookmarks command to edit the bookmarks file (PhilRunninger) [#954](https://github.com/scrooloose/nerdtree/pull/954)
- Before copying, turn off &shellslash. Restore after copy is finished. (PhilRunninger) [#952](https://github.com/scrooloose/nerdtree/pull/952)
- Set a maximum window size when zooming. (PhilRunninger) [#950](https://github.com/scrooloose/nerdtree/pull/950)
- Confirm the wipeout of a unsaved buffer whose file has been renamed. (PhilRunninger) [#949](https://github.com/scrooloose/nerdtree/pull/949)
- Escape a backslash so it can be used in a key mapping. (PhilRunninger) [#948](https://github.com/scrooloose/nerdtree/pull/948)
- Add a NERDTreeMinimalMenu feature (tuzz) [#938](https://github.com/scrooloose/nerdtree/pull/938)
- fixed root path error for windows (zcodes) [#935](https://github.com/scrooloose/nerdtree/pull/935)
- Restore getDirChildren for use in nerdtree-project-plugin. (PhilRunninger) [#929](https://github.com/scrooloose/nerdtree/pull/929)
- Document NERDTreeNodeDelimiter [#912](https://github.com/scrooloose/nerdtree/pull/912) (PhilRunninger) [#926](https://github.com/scrooloose/nerdtree/pull/926)
- Allow modification of menu keybindings (Leandros) [#923](https://github.com/scrooloose/nerdtree/pull/923)
- Add two more disqualifications for isCascadable(). (PhilRunninger) [#914](https://github.com/scrooloose/nerdtree/pull/914)
- Allow highlighting more than one flag. (kristijanhusak) [#908](https://github.com/scrooloose/nerdtree/pull/908)
- Support sorting files and directories by modification time. (PhilRunninger) [#901](https://github.com/scrooloose/nerdtree/pull/901)
- Parse . and .. from path string with trailing slash. (PhilRunninger) [#899](https://github.com/scrooloose/nerdtree/pull/899)
- Force sort to recalculate the cached sortKey. (PhilRunninger) [#898](https://github.com/scrooloose/nerdtree/pull/898)
- Add NERDTreeRefreshRoot command (wgfm) [#897](https://github.com/scrooloose/nerdtree/pull/897)
- Call Resolve on the file's path when calling :NERDTreeFind. (PhilRunninger) [#896](https://github.com/scrooloose/nerdtree/pull/896)
- Catch all errors, not just NERDTree errors. (PhilRunninger) [#894](https://github.com/scrooloose/nerdtree/pull/894)
- Fix typo in help file (lvoisin) [#892](https://github.com/scrooloose/nerdtree/pull/892)
- Make NERDTreeCreator set the `'nolist'` option (lifecrisis) [#889](https://github.com/scrooloose/nerdtree/pull/889)
- Refresh buffers after `m`, `m` operation on a folder (PhilRunninger) [#888](https://github.com/scrooloose/nerdtree/pull/888)
- Use a better arg for FINDSTR when using the m,l command in Windows. (PhilRunninger) [#887](https://github.com/scrooloose/nerdtree/pull/887)
- Fix the <C-J>/<C-K> motions, which currently fail with cascades (lifecrisis) [#886](https://github.com/scrooloose/nerdtree/pull/886)
- Function "s:UI.getLineNum()" doesn't always work on cascades. (lifecrisis) [#882](https://github.com/scrooloose/nerdtree/pull/882)
- NERDTreeCWD: reset CWD if changed by NERDTreeFocus (PhilRunninger) [#878](https://github.com/scrooloose/nerdtree/pull/878)
- Use <count>tabnext instead of <count>gt to allow users to remap gt. (PhilRunninger) [#877](https://github.com/scrooloose/nerdtree/pull/877)
- Do a case sensitive comparison of new/existing buffers. (PhilRunninger) [#875](https://github.com/scrooloose/nerdtree/pull/875)
- Fix opening sub-directories that have commas in their name. (PhilRunninger) [#873](https://github.com/scrooloose/nerdtree/pull/873)
- Add new command to open NERDTree in the root of a VCS repository. (PhilRunninger) [#872](https://github.com/scrooloose/nerdtree/pull/872)
- Make sure the path to the bookmarks file exists before writing it. (PhilRunninger) [#871](https://github.com/scrooloose/nerdtree/pull/871)
- Unzoom NERDTree when opening a file (PhilRunninger) [#870](https://github.com/scrooloose/nerdtree/pull/870)
- Support unusual characters in file and directory names (PhilRunninger) [#868](https://github.com/scrooloose/nerdtree/pull/868)
- Reword renamed-buffer prompt to be more clear (aflock) [#867](https://github.com/scrooloose/nerdtree/pull/867)
- Default to placing cursor on root when closing bookmark table (lifecrisis) [#866](https://github.com/scrooloose/nerdtree/pull/866)
- Fix issues with sorting of nodes (PhilRunninger) [#856](https://github.com/scrooloose/nerdtree/pull/856)
- Better OSX detection (bubba-h57) [#853](https://github.com/scrooloose/nerdtree/pull/853)
- Bugfix - ensure keymaps dictionary exists before using it (mnussbaum) [#852](https://github.com/scrooloose/nerdtree/pull/852)
- Decrease startup-time by avoiding linear-time iteration over key mappings (mnussbaum) [#851](https://github.com/scrooloose/nerdtree/pull/851)
- Add code to sort mappings in quickhelp (lifecrisis) [#849](https://github.com/scrooloose/nerdtree/pull/849)
- Use ":clearjumps" in new NERDTree windows (lifecrisis) [#844](https://github.com/scrooloose/nerdtree/pull/844)
- Like m-c did before, create parent directories if needed on m-m. (PhilRunninger) [#840](https://github.com/scrooloose/nerdtree/pull/840)
- BUGFIX: Repair a problem with the `'u'` mapping. (lifecrisis) [#838](https://github.com/scrooloose/nerdtree/pull/838)
- Make the NERDTree buffer writable when rendering it. (PhilRunninger) [#837](https://github.com/scrooloose/nerdtree/pull/837)
- Code cleanup: Remove unsupported bookmark table mappings (lifecrisis) [#835](https://github.com/scrooloose/nerdtree/pull/835)
- Replace strcharpart() with substitute() for backward compatibility (bravestarr) [#834](https://github.com/scrooloose/nerdtree/pull/834)
- Fixed error `unknown function strcharpart` for older versions of Vim (hav4ik) [#833](https://github.com/scrooloose/nerdtree/pull/833)
- Clear output when NERDTree menu is aborted (lifecrisis) [#832](https://github.com/scrooloose/nerdtree/pull/832)
- Display a path with multi-byte characters correctly when it is truncated (bravestarr) [#830](https://github.com/scrooloose/nerdtree/pull/830)
- Support revealing file and executing file with xdg-open for Linux (ngnmhieu) [#824](https://github.com/scrooloose/nerdtree/pull/824)
- If node isn't open, count children on disk before deleting. (PhilRunninger) [#822](https://github.com/scrooloose/nerdtree/pull/822)
- Add new variable g:NERDTreeRemoveFileCmd (kutsan) [#816](https://github.com/scrooloose/nerdtree/pull/816)
- Use a better check for existence of the NERDTree buffer. (PhilRunninger) [#814](https://github.com/scrooloose/nerdtree/pull/814)
- Fix focussing previous buffer when closing NERDTree (mrubli) [#801](https://github.com/scrooloose/nerdtree/pull/801)
- Update the docs for "NERDTreeStatusline" (lifecrisis) [#796](https://github.com/scrooloose/nerdtree/pull/796)
- BUGFIX: Unstable behavior in the "getPath()" method (lifecrisis) [#795](https://github.com/scrooloose/nerdtree/pull/795)
- Revert the bugfix from pull request [#785](https://github.com/scrooloose/nerdtree/pull/785) (lifecrisis) [#794](https://github.com/scrooloose/nerdtree/pull/794)
- BUGFIX: Allow ":NERDTreeFind" to discover hidden files (lifecrisis) [#786](https://github.com/scrooloose/nerdtree/pull/786)
- BUGFIX: Allow ":NERDTreeFind" to reveal new files (lifecrisis) [#785](https://github.com/scrooloose/nerdtree/pull/785)
- Add modelines (lifecrisis) [#782](https://github.com/scrooloose/nerdtree/pull/782)
- Change the type of completion used by NERDTreeFind (lifecrisis) [#781](https://github.com/scrooloose/nerdtree/pull/781)
- change NERDTreeFind with args (zhenyangze) [#778](https://github.com/scrooloose/nerdtree/pull/778)
- Style Choice: Using confirm() when deleting a bookmark (lifecrisis) [#777](https://github.com/scrooloose/nerdtree/pull/777)
- remove useless substitute when `file =~# "/$"` (skyblueee) [#773](https://github.com/scrooloose/nerdtree/pull/773)
- remove useless removeLeadingSpaces in _stripMarkup (skyblueee) [#772](https://github.com/scrooloose/nerdtree/pull/772)
- Make the "o" mapping consistent with "x" (lifecrisis) [#769](https://github.com/scrooloose/nerdtree/pull/769)
- Fix a problem with the "x" handler (lifecrisis) [#768](https://github.com/scrooloose/nerdtree/pull/768)
- Clean up the handler for the "x" mapping (lifecrisis) [#767](https://github.com/scrooloose/nerdtree/pull/767)
- Revert change to tab opening method (lifecrisis) [#766](https://github.com/scrooloose/nerdtree/pull/766)
- BUGFIX: Add back support for "b:NERDTreeRoot" (lifecrisis) [#765](https://github.com/scrooloose/nerdtree/pull/765)
- Fix broken "t" and "T" mappings, tabs now open at end (lifecrisis) [#759](https://github.com/scrooloose/nerdtree/pull/759)
- Update doc with already existing mapping variables (asnr) [#699](https://github.com/scrooloose/nerdtree/pull/699)
- Fix the broken g:NERDTreeBookmarksSort setting (lifecrisis) [#696](https://github.com/scrooloose/nerdtree/pull/696)
- Correct NERDTreeIgnore pattern in doc (cntoplolicon) [#648](https://github.com/scrooloose/nerdtree/pull/648)
- Remove empty segments when splitting path (sooth-sayer) [#574](https://github.com/scrooloose/nerdtree/pull/574)
- Suppress autocmds less agressively (wincent) [#578](https://github.com/scrooloose/nerdtree/pull/578) [#691](https://github.com/scrooloose/nerdtree/pull/691)
- Add an Issues template to ask for more info initially.
- Fix markdown headers in readme (josephfrazier) #676
- Don't touch @o and @h registers when rendering
- Fix bug with files and directories with dollar signs (alegen) #649
- Reuse/reopen existing window trees where possible #244
- Fix markdown headers in readme (josephfrazier) [#676](https://github.com/scrooloose/nerdtree/pull/676)
- Don't touch `@o` and `@h` registers when rendering
- Fix bug with files and directories with dollar signs (alegen) [#649](https://github.com/scrooloose/nerdtree/pull/649)
- Reuse/reopen existing window trees where possible [#244](https://github.com/scrooloose/nerdtree/pull/244)
- Remove NERDTree.previousBuf()
- Change color of arrow (Leeiio) #630
- Improved a tip in README.markdown (ggicci) #628
- Shorten delete confimration of empty directory to `y` (mikeperri) #530
- Fix API call to open directory tree in window (devm33) #533
- Change default arrows on non-Windows platforms (gwilk) #546
- Update to README - combine cd and git clone (zwhitchcox) #584
- Update to README - Tip: start NERDTree when vim starts (therealplato) #593
- Escape filename when moving an open buffer (zacharyvoase) #595
- Fixed incorrect :helptags command in README (curran) #619
- Fixed incomplete escaping of folder arrows (adityanatraj) #548
- Added NERDTreeCascadeSingleChildDir option (juanibiapina) #558
- Change color of arrow (Leeiio) [#630](https://github.com/scrooloose/nerdtree/pull/630)
- Improved a tip in README.markdown (ggicci) [#628](https://github.com/scrooloose/nerdtree/pull/628)
- Shorten delete confimration of empty directory to `y` (mikeperri) [#530](https://github.com/scrooloose/nerdtree/pull/530)
- Fix API call to open directory tree in window (devm33) [#533](https://github.com/scrooloose/nerdtree/pull/533)
- Change default arrows on non-Windows platforms (gwilk) [#546](https://github.com/scrooloose/nerdtree/pull/546)
- Update to README - combine cd and git clone (zwhitchcox) [#584](https://github.com/scrooloose/nerdtree/pull/584)
- Update to README - Tip: start NERDTree when vim starts (therealplato) [#593](https://github.com/scrooloose/nerdtree/pull/593)
- Escape filename when moving an open buffer (zacharyvoase) [#595](https://github.com/scrooloose/nerdtree/pull/595)
- Fixed incorrect :helptags command in README (curran) [#619](https://github.com/scrooloose/nerdtree/pull/619)
- Fixed incomplete escaping of folder arrows (adityanatraj) [#548](https://github.com/scrooloose/nerdtree/pull/548)
- Added NERDTreeCascadeSingleChildDir option (juanibiapina) [#558](https://github.com/scrooloose/nerdtree/pull/558)
- Replace strchars() with backward compatible workaround.
- Add support for copy command in Windows (SkylerLipthay) #231
- Add support for copy command in Windows (SkylerLipthay) [#231](https://github.com/scrooloose/nerdtree/pull/231)
- Fixed typo in README.markdown - :Helptags -> :helptags
- Rename "primary" and "secondary" trees to "tab" and "window" trees.
- Move a bunch of buffer level variables into the NERDTree and UI classes.
- Display cascading dirs on one line to save vertical/horizontal space (@matt-gardner: brainstorming/testing)
- Display cascading dirs on one line to save vertical/horizontal space (matt-gardner: brainstorming/testing)
- Remove the old style UI - Remove `NERDTreeDirArrows` option.
- On windows default to + and ~ for expand/collapse directory symbols.
- Lots more refactoring. Move a bunch of b: level vars into b:NERDTree and friends.
@@ -128,7 +135,7 @@
- Refactor the code significantly:
* Break the classes out into their own files.
* Make the majority of the code OO - previously large parts were effectively a tangle of "global" methods.
- Add an API to assign flags to nodes. This allows VCS plugins like https://github.com/Xuyuanp/nerdtree-git-plugin to exist. Thanks to @Xuyuanp for helping design/test/build said API.
- Add an API to assign flags to nodes. This allows VCS plugins like https://github.com/Xuyuanp/nerdtree-git-plugin to exist. Thanks to **Xuyuanp** for helping design/test/build said API.
- add `scope` argument to the key map API see :help NERDTreeAddKeyMap()
- add magic [[dir]] and [[file]] flags to NERDTreeIgnore
- add support for custom path filters. See :help NERDTreeAddPathFilter()

View File

@@ -3,8 +3,9 @@ if exists("g:loaded_nerdtree_autoload")
endif
let g:loaded_nerdtree_autoload = 1
let s:rootNERDTreePath = resolve(expand("<sfile>:p:h:h"))
function! nerdtree#version(...)
let l:changelog = readfile(expand("<sfile>:p:h")."/CHANGELOG.md")
let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash()))
let l:text = 'Unknown'
let l:line = 0
while l:line <= len(l:changelog)
@@ -21,6 +22,35 @@ endfunction
" SECTION: General Functions {{{1
"============================================================
"FUNCTION: nerdtree#redraw(bang)
" Redraws the screen (Neovim uses the mode statement). If bang is TRUE, use
" redraw! instead of redraw.
function! nerdtree#redraw(bang)
if has('nvim')
mode
else
if a:bang
redraw!
else
redraw
endif
endif
endfunction
"FUNCTION: nerdtree#slash()
" Returns the directory separator based on OS and &shellslash
function! nerdtree#slash()
if nerdtree#runningWindows()
if exists('+shellslash') && &shellslash
return '/'
endif
return '\'
endif
return '/'
endfunction
"FUNCTION: nerdtree#and(x,y) {{{2
" Implements and() function for Vim <= 7.2
function! nerdtree#and(x,y)
@@ -202,7 +232,7 @@ endfunction
"Args:
"msg: the message to echo
function! nerdtree#echo(msg)
redraw
call nerdtree#redraw(0)
echomsg empty(a:msg) ? "" : ("NERDTree: " . a:msg)
endfunction

View File

@@ -17,6 +17,7 @@ function! nerdtree#ui_glue#createDefaultBindings()
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'FileNode', 'callback': s."customOpenFile"})
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'DirNode', 'callback': s."customOpenDir"})
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'Bookmark', 'callback': s."customOpenBookmark"})
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapCustomOpen, 'scope':'all', 'callback': s."activateAll" })
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "DirNode", 'callback': s."activateDirNode" })
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': "FileNode", 'callback': s."activateFileNode" })
@@ -94,7 +95,7 @@ endfunction
"FUNCTION: s:customOpenBookmark() {{{1
" Open bookmark node with the "custom" key, initially <CR>.
function! s:customOpenBookmark(node)
if node.isDirectory
if a:node.path.isDirectory
call a:node.activate(b:NERDTree, s:initCustomOpenArgs().dir)
else
call a:node.activate(b:NERDTree, s:initCustomOpenArgs().file)
@@ -253,7 +254,7 @@ function! s:deleteBookmark(bookmark)
let l:choices = "&Yes\n&No"
echo | redraw
echo | call nerdtree#redraw(0)
let l:selection = confirm(l:message, l:choices, 1, 'Warning')
if l:selection != 1
@@ -265,7 +266,7 @@ function! s:deleteBookmark(bookmark)
call a:bookmark.delete()
silent call b:NERDTree.root.refresh()
call b:NERDTree.render()
echo | redraw
echo | call nerdtree#redraw(0)
catch /^NERDTree/
call nerdtree#echoWarning('could not remove bookmark')
endtry
@@ -576,7 +577,7 @@ function! s:refreshRoot()
call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w")
call b:NERDTree.root.refresh()
call b:NERDTree.render()
redraw
call nerdtree#redraw(0)
call nerdtree#exec(l:curWin . "wincmd w")
call nerdtree#echo("")
endfunction

View File

@@ -31,7 +31,7 @@ function! s:MenuController.showMenu()
let l:done = 0
while !l:done
redraw!
call nerdtree#redraw(1)
call self._echoPrompt()
let l:key = nr2char(getchar())
@@ -42,7 +42,7 @@ function! s:MenuController.showMenu()
" Redraw when "Ctrl-C" or "Esc" is received.
if !l:done || self.selection == -1
redraw!
call nerdtree#redraw(1)
endif
endtry

View File

@@ -254,7 +254,7 @@ endfunction
" gets the line number of the root node
function! s:UI.getRootLineNum()
let rootLine = 1
while getline(rootLine) !~# '^\(/\|<\)'
while rootLine <= line('$') && getline(rootLine) !~# '^\(/\|<\)'
let rootLine = rootLine + 1
endwhile
return rootLine

View File

@@ -78,7 +78,7 @@ function! s:inputPrompt(action)
endif
if g:NERDTreeMenuController.isMinimal()
redraw! " Clear the menu
call nerdtree#redraw(1) " Clear the menu
return minimal . " "
else
let divider = "=========================================================="
@@ -185,7 +185,7 @@ function! NERDTreeAddNode()
call newTreeNode.putCursorHere(1, 0)
endif
redraw!
call nerdtree#redraw(1)
catch /^NERDTree/
call nerdtree#echoWarning("Node Not Created.")
endtry
@@ -234,7 +234,7 @@ function! NERDTreeMoveNode()
call curNode.putCursorHere(1, 0)
redraw!
call nerdtree#redraw(1)
catch /^NERDTree/
call nerdtree#echoWarning("Node Not Renamed.")
endtry
@@ -272,7 +272,7 @@ function! NERDTreeDeleteNode()
call s:promptToDelBuffer(bufnum, prompt)
endif
redraw!
call nerdtree#redraw(1)
catch /^NERDTree/
call nerdtree#echoWarning("Could not remove node")
endtry
@@ -362,7 +362,7 @@ function! NERDTreeCopyNode()
call nerdtree#echo("Copy aborted.")
endif
let &shellslash = l:shellslash
redraw!
call nerdtree#redraw(1)
endfunction
" FUNCTION: NERDTreeCopyPath() {{{1