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

[Feature Request] Retain history when reloading a file modified by another program #14814

Open
Calciferz opened this issue Feb 29, 2024 · 1 comment

Comments

@Calciferz
Copy link

Calciferz commented Feb 29, 2024

Description of the Issue

I've made a mistake of clicking "Yes" on the dialog asking "This file has been modified by another program. Do you want to reload it and lose the changes made in Notepad++?"
I've realized too late that important changes weren't saved yet. TBH I probably skimmed through the question and missed the part "and lose the changes", since I regularly see the dialog without that part due to git updates and it's inefficient to read it every time.

Some work was lost. Could you please make it so that reloading a file on external modification would instead add a new history entry with the new contents of the file? That way the modifications in Notepad++ can be restored with Ctrl-Z if this was a mistake. This would also fit well with a workflow when some changes are made with an external program (e.g. a markdown editor or an update from git).

Steps to Reproduce the Issue

  1. Open a file
  2. Make a change, do not save
  3. Switch to another program and change the same file, save it
  4. Return to Notepad++, answer "Yes" to the question "This file has been modified by another program. Do you want to reload it and lose the changes made in Notepad++?"

Expected Behavior

After answering "Yes" I'd like to be able to press Ctrl-Z to restore the previous version modified in Notepad++ and unsaved.
Additionally "and lose the changes" could be written in bold.

Actual Behavior

Ctrl-Z does nothing as the editing history is emptied when the file is reloaded.

Debug Information

Not a bug, nothing to debug.

Thank you for this awesome editor!

@notdodgeball
Copy link
Contributor

Duplicate of #12766 I believe

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

2 participants