From e1526b995aba2e8cd7b4ee018abaaf62e9897e06 Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:22:23 +1000 Subject: Feature [feature-requests:#1519]. Cherry pick SC_MASK_HISTORY from isscint. --- doc/ScintillaDoc.html | 9 +++++++-- include/Scintilla.h | 1 + include/Scintilla.iface | 2 ++ include/ScintillaTypes.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 6dda5eaaa..8f9e22290 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -2232,6 +2232,9 @@ struct Sci_TextToFindFull { + +
The bits used for change history markers are specified by SC_MASK_HISTORY
, which is commonly
+ used as an argument to SCI_SETMARGINMASKN
when defining a margin to be used for change history.
Indicators:
@@ -4468,8 +4471,10 @@ struct Sci_TextToFindFull { The mask is a 32-bit value. Each bit corresponds to one of 32 logical symbols that can be displayed in a margin that is enabled for symbols. There is a useful constant,SC_MASK_FOLDERS
(0xFE000000 or -33554432), that is a mask for the 7 logical
- symbols used to denote folding. You can assign a wide range of symbols and colours to each of
- the 32 logical symbols, see Markers for more information. If (mask
+ symbols used to denote folding, and another, SC_MASK_HISTORY
(0x01E00000 or
+ 31457280), that is a mask for the 4 logical symbols used to denote change history. You can
+ assign a wide range of symbols and colours to each of the 32 logical symbols, see
+ Markers for more information. If (mask
& SC_MASK_FOLDERS)==0
, the margin background colour is controlled by style 33 (STYLE_LINENUMBER
).
diff --git a/include/Scintilla.h b/include/Scintilla.h
index b51c8c2ab..c25dc5ed9 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -166,6 +166,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP
#define SC_MARKNUM_FOLDERSUB 29
#define SC_MARKNUM_FOLDER 30
#define SC_MARKNUM_FOLDEROPEN 31
+#define SC_MASK_HISTORY 0x01E00000
#define SC_MASK_FOLDERS 0xFE000000
#define SCI_MARKERDEFINE 2040
#define SCI_MARKERSETFORE 2041
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index bba11003b..4dec3579f 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -410,6 +410,8 @@ ali SC_MARKNUM_FOLDERTAIL=FOLDER_TAIL
ali SC_MARKNUM_FOLDERSUB=FOLDER_SUB
ali SC_MARKNUM_FOLDEROPEN=FOLDER_OPEN
+val SC_MASK_HISTORY=0x01E00000
+
# SC_MASK_FOLDERS doesn't go in an enumeration as larger than max 32-bit positive integer
val SC_MASK_FOLDERS=0xFE000000
diff --git a/include/ScintillaTypes.h b/include/ScintillaTypes.h
index 62d220b2a..4b7773a26 100644
--- a/include/ScintillaTypes.h
+++ b/include/ScintillaTypes.h
@@ -690,6 +690,7 @@ using sptr_t = intptr_t;
constexpr Position InvalidPosition = -1;
constexpr int CpUtf8 = 65001;
constexpr int MarkerMax = 31;
+constexpr int MaskHistory = 0x01E00000;
constexpr int MaskFolders = 0xFE000000;
constexpr int MaxMargin = 4;
constexpr int FontSizeMultiplier = 100;
--
cgit v1.2.3