diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-01-07 11:51:34 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-01-07 11:51:34 +1100 |
| commit | 0627663abd14c81cafde85ce9cc0502d9bc3a6c3 (patch) | |
| tree | e589496c8e779dd46082331a72d0c6182fd52dab | |
| parent | d349445ceff7c209c3edf679cff3147d7201401d (diff) | |
| download | scintilla-mirror-0627663abd14c81cafde85ce9cc0502d9bc3a6c3.tar.gz | |
Bug [#2491]. Fix lexing after undo at end of document.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | src/Document.cxx | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 25ca454cf..12b233b4f 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -607,6 +607,10 @@ <a href="https://sourceforge.net/p/scintilla/bugs/2488/">Bug #2488</a>. </li> <li> + Fix lexing after undo at end of document. + <a href="https://sourceforge.net/p/scintilla/bugs/2491/">Bug #2491</a>. + </li> + <li> On Qt, add const to ScintillaDocument and ScintillaEdit methods. <a href="https://sourceforge.net/p/scintilla/bugs/2494/">Bug #2494</a>. </li> diff --git a/src/Document.cxx b/src/Document.cxx index 064b336e3..e4db66a19 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1590,7 +1590,10 @@ Sci::Position Document::Undo() { } cb.PerformUndoStep(); if (action.at != ActionType::container) { - ModifiedAt(action.position); + if ((action.at == ActionType::insert) && (action.position >= LengthNoExcept()) && (action.position > 0)) + ModifiedAt(action.position - 1); + else + ModifiedAt(action.position); newPos = action.position; } |
