Share via

Notepad bug

Xinhong Pu 0 Reputation points
2026-02-20T06:26:15.35+00:00

Notepad on Windows 11 improved much than prior Windows. However, there is an issue for the Notepad on Windows 11.

Steps to re-produce:

  1. Open any text file with Notepad.
  2. Make some changes.
  3. A dot as changed mark will be appeared on the opened file. A warning message will be popped up upon closing the changed text file without saving.
  4. Ctrl-Z to undo and then Ctrl-Y to redo.
  5. Changed mark will be disappeared after step 4. There will be no warning message popped up when closing the changed text file without saving.
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

3 answers

Sort by: Most helpful
  1. VPHAN 35,770 Reputation points Independent Advisor
    2026-02-22T07:31:04.1433333+00:00

    Hello Xinhong Pu,

    Following up on your issue, I want to ensure you have the most reliable information to manage this flaw. After reevaluating the current Microsoft development pipelines and Windows Insider release notes, I can confirm this specific buffer state anomaly remains an unpatched issue within the stable release source code.

    Because this is a hardcoded logic flaw within the application's internal text control architecture, there are no valid registry modifications or Group Policy Object overrides to manually enforce the correct save prompt behavior. The absolute best practice to prevent accidental data loss while waiting for an official Microsoft engineering patch is to utilize the native session caching feature. By navigating to the Notepad settings and ensuring the startup behavior is set to "Open content from the previous session," the operating system automatically caches your active text buffer to %LocalAppData%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState. This caching mechanism securely preserves your uncommitted strings even when the application closes without warning due to this bug. Please maintain this specific configuration and monitor the Microsoft Store for the future Microsoft.WindowsNotepad package update that will deploy the permanent resolution.

    Hope this answer brought you some useful information. If it has, please consider accepting the answer so that other people sharing the same issue would benefit too. Thank you :)

    VP

    Was this answer helpful?

    0 comments No comments

  2. VPHAN 35,770 Reputation points Independent Advisor
    2026-02-20T10:42:56.65+00:00

    Hello Xinhong Pu,

    Your reproduction steps are exceptionally clear and precisely describe a known regression in how the newer tabbed interface handles the internal IsModified property of the underlying text control. When a redo command (Ctrl-Y) repopulates the text buffer, the application framework fails to reassert the dirty flag, tricking the application's close event handler into bypassing the save confirmation dialog. To ensure this isn't an anomaly already addressed in a Windows Insider Preview build, what specific version string of the Notepad app is currently installed on your system? You can retrieve this by executing Get-AppxPackage Microsoft.WindowsNotepad within an elevated PowerShell prompt.

    Since this is an unpatched flaw within the current stable release's source code, there are no registry modifications or Group Policy overrides to force the dirty flag to persist correctly during a redo operation. You must wait for an official patch from Microsoft engineering. In the meantime, configuring the application's launch state is your best native safeguard against accidental data loss. Navigate to the Notepad settings and ensure the startup behavior is configured to "Open content from the previous session". This caches the active text buffer locally in %LocalAppData%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState, preserving unsaved strings even if the application terminates without a prompt. You should also submit your exact replication sequence to the Windows Feedback Hub using Win+F to help escalate the Appx package update in the development queue.

    Hope you found something useful in the answer. If it helped you get more insight into the issue, please consider accepting it. Thank you and have a nice day!

    VP

    Was this answer helpful?

    0 comments No comments

  3. AI answer

    2026-02-20T06:26:22.01+00:00

    The issue you're experiencing with Notepad on Windows 11, where the changed mark disappears after using Ctrl-Z (undo) and Ctrl-Y (redo), resulting in no warning message when closing the file without saving, seems to be a bug. While Notepad has seen significant improvements, including better handling of encoding and additional shortcuts, specific bugs like the one you described may still occur.

    Unfortunately, the provided context does not include a resolution for this particular bug. It may be beneficial to report this issue through the Feedback Hub under Apps > Notepad, as Microsoft welcomes user feedback to improve their applications.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.