notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

[FEAT] On file reload : do **NOT** flush undo/redo

Open
#12,766 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

File opened in editor gets modified by external program.
The file is updated in the editor (automatically or manually).
The previous version is lost forever, the undo/redo arrows are disabled.

Steps to Reproduce the Issue
  1. See Description just above
Expected Behavior

If file is reloaded due to an external change :

  1. Store current version in undo history
  2. Disable redo
  3. Reload file
  4. If new version is not wanted, click undo to restore previous version
  5. If new version modified, keep it in undo, continue as normal
  6. That's to say we still have "previous" version in undo history
Actual Behavior
  1. See Description just above
Debug Information

No debug to provide.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue: open a file, modify it externally, and trigger the editor's reload. Trace the reload and undo/redo handling in the relevant editor code. Done means the externally reloaded version is undoable, redo is disabled, and undo restores the prior in-editor version without losing subsequent history.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.