scrooloose/nerdtree — pull request #158 by paulguare (2012-04-30 20:43:40+00:00)
Title: Suppress prompt to delete unlisted buffers when moving a file

If you try to (m)ove a file that's open in an unlisted buffer, you see the usual prompt asking if you want to delete the buffer. If you answer 'y', you'll get an error like the following:

```
Error detected while processing function 52_KeyMap_Invoke..127..126..52_showMenu..131..148..NERDTreeMoveNode..54_promptToDelBuffer:
line 3:
E516: No buffers were deleted: silent bdelete! 3
Error detected while processing function 52_KeyMap_Invoke..127..126..52_showMenu..131..148:
line 6:
E171: Missing :endif
Error detected while processing function 52_KeyMap_Invoke..127..126..52_showMenu..131:
line 19:
E171: Missing :endif
Error detected while processing function 52_KeyMap_Invoke..127..126:
line 3:
E171: Missing :endif
Error detected while processing function 52_KeyMap_Invoke..127:
line 23:
E171: Missing :endif
```

This doesn't happen when you (d)elete a file that's open in an unlisted buffer because the equivalent check in NERDTreeDeleteNode ignores unlisted buffers (so you never see the prompt asking if you want to delete the buffer).

I've 'fixed' this by making NERDTreeMoveNode behave like NERDTreeDeleteNode