Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Suppress prompt to delete unlisted buffers when moving a file #158

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@ghost

ghost commented Apr 30, 2012

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 <SNR>52_KeyMap_Invoke..127..126..<SNR>52_showMenu..131..148..NERDTreeMoveNode..<SNR>54_promptToDelBuffer:
line    3:
E516: No buffers were deleted: silent bdelete! 3
Error detected while processing function <SNR>52_KeyMap_Invoke..127..126..<SNR>52_showMenu..131..148:
line    6:
E171: Missing :endif
Error detected while processing function <SNR>52_KeyMap_Invoke..127..126..<SNR>52_showMenu..131:
line   19:
E171: Missing :endif
Error detected while processing function <SNR>52_KeyMap_Invoke..127..126:
line    3:
E171: Missing :endif
Error detected while processing function <SNR>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

nybblr commented Oct 19, 2012

What is the status of this issue? I get this error almost every other time I move a file; will these changes be merged upstream, or is another solution en route? Ideally, moving a file should just rename any open buffers instead of closing them (e.g. changing application.css to application.css.sass should leave the buffer open, but relinked to the new name.)

~ Jonathan Martin

@ghost ghost closed this May 1, 2013

nybblr commented May 3, 2013

Has this been fixed? The pull request is closed but nothing was merged...

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment