prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 163 forks source link

Fix a bug where a user could leave a buffer with unsaved changes #17

Closed Maome closed 9 years ago

Maome commented 9 years ago

Fix a bug where a user could leave a buffer with unsaved changes by issuing a :b [arg] or :buffer [arg] editor command

Repro: Open pyvim file1 file2 Edit file 1 without issuing a write command Attempt to switch to file2's buffer (':b file2' or ':b 1') Without the fix this will succeed

After the fix this displays an editor message ('No write since last change (add ! to override)') similar to the official vim.

jonathanslenders commented 9 years ago

This has been merged: https://github.com/jonathanslenders/pyvim/commit/dfed3a3ee3ad4704cc033f81c2a1b4c0aee3f7a1

Thank you!

By the way, I also added the same force option for the bn and bp commands.