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

Forbit move if file unsaved #946

Closed
MarcelRobitaille opened this issue Feb 13, 2019 · 0 comments
Closed

Forbit move if file unsaved #946

MarcelRobitaille opened this issue Feb 13, 2019 · 0 comments

Comments

@MarcelRobitaille
Copy link

I have gotten bitten multiple times by renaming a file before realizing I hadn't saved it. I think NERDTree should warn against this (maybe have you type the whole file name, as GitHub does when deleting a repository).

Environment

  • Operating System: 4.20.7-arch1-1-ARCH
  • Vim version :version: 8.1
  • NERDTree version git rev-parse --short HEAD: 72c3656

Process

  1. Make changes to a buffer
  2. Rename it in NERDTree before saving
  3. Hit y out of habit

Current Result

The unsaved buffer is closed and a new one is opened with the contents of the file from disk, resulting in your changes being lost.

Expected Result

NERDTree should not allow this, forcing you to save the buffer or explicitly discard changes.

I apologize if I am overlooking something obvious. I know I could probably recover the buffer, but I just lost one through my own stupidity (renamed the file back).

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

No branches or pull requests

1 participant