From 3de9d37c7b8f4501558d309ada718dc52533e94c Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 22 Jan 2025 21:34:54 +1100 Subject: Bug [#1224]. Remember selection in undo history. SCI_SETSELECTIONUNDOHISTORY. --- include/Scintilla.h | 2 ++ include/Scintilla.iface | 6 ++++++ include/ScintillaCall.h | 2 ++ include/ScintillaMessages.h | 2 ++ 4 files changed, 12 insertions(+) (limited to 'include') diff --git a/include/Scintilla.h b/include/Scintilla.h index e434b9f95..9f5b4e7a2 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -532,6 +532,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_CHANGE_HISTORY_INDICATORS 4 #define SCI_SETCHANGEHISTORY 2780 #define SCI_GETCHANGEHISTORY 2781 +#define SCI_SETSELECTIONUNDOHISTORY 2782 +#define SCI_GETSELECTIONUNDOHISTORY 2783 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 4a3d15b63..ba37ceaf3 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1334,6 +1334,12 @@ set void SetChangeHistory=2780(ChangeHistoryOption changeHistory,) # Report change history status. get ChangeHistoryOption GetChangeHistory=2781(,) +# Enable or disable selection undo history. +set void SetSelectionUndoHistory=2782(bool selectionUndoHistory,) + +# Report selection undo history status. +get bool GetSelectionUndoHistory=2783(,) + # Retrieve the display line at the top of the display. get line GetFirstVisibleLine=2152(,) diff --git a/include/ScintillaCall.h b/include/ScintillaCall.h index c1f35571f..ab0bb3306 100644 --- a/include/ScintillaCall.h +++ b/include/ScintillaCall.h @@ -360,6 +360,8 @@ public: Position FormatRangeFull(bool draw, RangeToFormatFull *fr); void SetChangeHistory(Scintilla::ChangeHistoryOption changeHistory); Scintilla::ChangeHistoryOption ChangeHistory(); + void SetSelectionUndoHistory(bool selectionUndoHistory); + bool SelectionUndoHistory(); Line FirstVisibleLine(); Position GetLine(Line line, char *text); std::string GetLine(Line line); diff --git a/include/ScintillaMessages.h b/include/ScintillaMessages.h index df7f2e743..02dd42e24 100644 --- a/include/ScintillaMessages.h +++ b/include/ScintillaMessages.h @@ -285,6 +285,8 @@ enum class Message { FormatRangeFull = 2777, SetChangeHistory = 2780, GetChangeHistory = 2781, + SetSelectionUndoHistory = 2782, + GetSelectionUndoHistory = 2783, GetFirstVisibleLine = 2152, GetLine = 2153, GetLineCount = 2154, -- cgit v1.2.3