Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed

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

wants to merge 2 commits into from

Conversation

ghost
Copy link

@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
Copy link

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
Copy link

nybblr commented May 3, 2013

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

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants