https://bugs.kde.org/show_bug.cgi?id=523615

Christoph Cullmann <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/ktexteditor/-/commit
                   |                            |/198ffc976c90f69b4617bad75e
                   |                            |0af4cde97ea9b9

--- Comment #3 from Christoph Cullmann <[email protected]> ---
Git commit 198ffc976c90f69b4617bad75e0af4cde97ea9b9 by Christoph Cullmann, on
behalf of Waqar Ahmed.
Committed on 17/10/2026 at 15:06.
Pushed by cullmann into branch 'master'.

Clear the undo history before auto reloading a file changed on disk

slotDelayedHandleModOnHd() has already updated the checksum to the one
of the new file and resets m_modOnHd before calling documentReload().
documentReload() then doesn't clear the undo history, and the undo
manager restores it after the reload because the checksum matches. Undo
then applies the edits of the old content to the new content, which
crashes if the lines don't exist anymore.

M  +39   -0    autotests/src/katedocument_test.cpp
M  +1    -0    autotests/src/katedocument_test.h
M  +10   -5    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/198ffc976c90f69b4617bad75e0af4cde97ea9b9

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to