Enable Scintilla undo/redo selection history

Ref:
https://www.scintilla.org/ScintillaDoc.html#SCI_SETUNDOSELECTIONHISTORY

Fix #16488, close #16496
This commit is contained in:
xomx 2025-05-02 22:58:47 +02:00 committed by Don Ho
parent a9d8dca832
commit eb1b7977f6

View File

@ -386,6 +386,10 @@ LRESULT Notepad_plus::init(HWND hwnd)
_mainEditView.execute(SCI_STYLESETCHECKMONOSPACED, STYLE_DEFAULT, true);
_subEditView.execute(SCI_STYLESETCHECKMONOSPACED, STYLE_DEFAULT, true);
// Restore also the possible previous selection for each undo/redo op (memory cost min 150B for each op)
_mainEditView.execute(SCI_SETUNDOSELECTIONHISTORY, SC_UNDO_SELECTION_HISTORY_ENABLED);
_subEditView.execute(SCI_SETUNDOSELECTIONHISTORY, SC_UNDO_SELECTION_HISTORY_ENABLED);
const auto& hf = _mainDocTab.getFont(nppGUI._tabStatus & TAB_REDUCE);
if (hf)
{