From 926cb6f7d228b347db16a45e1f2632da475da1f0 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 31 Jul 2022 15:51:53 +1000 Subject: Added change history which can display document changes (modified, saved, ...) in the margin or in the text. --- doc/ScintillaDoc.html | 243 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 195 insertions(+), 48 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 503984654..3149b06a0 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -129,7 +129,7 @@

Scintilla Documentation

-

Last edited 18 July 2022 NH

+

Last edited 31 July 2022 NH

Scintilla 5 has moved the lexers from Scintilla into a new Lexilla project.
@@ -345,149 +345,139 @@ + ○ Change history + ○ Selection and informationBy character or UTF-16 code unit - ○ Multiple Selection and Virtual Space - + ○ Multiple Selection and Virtual Space + ○ Scrolling and automatic scrollingWhite space - - ○ Cursor - + ○ Cursor + ○ Mouse captureLine endings - ○ Words - + ○ Words + ○ StylingStyle definition - - ○ Element colours - + ○ Element colours + ○ Selection, caret, and hotspot stylesCharacter representations - - ○ Margins - + ○ Margins + ○ AnnotationsOther settings - - ○ Brace highlighting - + ○ Brace highlighting + ○ Tabs and Indentation GuidesMarkers - - ○ Indicators - + ○ Indicators + ○ AutocompletionUser lists - - ○ Call tips - + ○ Call tips + ○ Keyboard commandsKey bindings - - ○ Popup edit menu - + ○ Popup edit menu + ○ Macro recordingPrinting - - ○ Direct access - + ○ Direct access + ○ Multiple viewsBackground loading and saving - - ○ Folding - + ○ Folding + ○ Line wrappingZooming - - ○ Long lines - + ○ Long lines + ○ AccessibilityLexer - - ○ Lexer objects - + ○ Lexer objects + ○ NotificationsImages - - ○ GTK - + ○ GTK + ○ Provisional messagesDeprecated messages + + ○ Edit messages never supported by Scintilla - - - ○ Removed featuresBuilding Scintilla + + ○ End of Line Annotations - @@ -1343,6 +1333,157 @@ struct Sci_TextToFindFull { Coalescing treats coalescible container actions as transparent so will still only group together insertions that look like typing or deletions that look like multiple uses of the Backspace or Delete keys.

+ +

Change history

+ +

Scintilla can display document changes (modified, saved, ...) in the margin or in the text.

+ +

This feature uses a moderate amount of memory proportional to the amount of modifications made. + On huge documents, this could be significant so could be disabled when it would cause excessive memory use.

+ + SCI_SETCHANGEHISTORY(int changeHistory)
+ SCI_GETCHANGEHISTORY → int
+
+ +

SCI_SETCHANGEHISTORY(int changeHistory)
+ SCI_GETCHANGEHISTORY → int
+ SCI_SETCHANGEHISTORY turns this feature on and off and determines whether changes are visible in + the margin or text or both. + The changeHistory argument can be a combination of:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SC_CHANGE_HISTORY_DISABLED0The default: change history turned off.
SC_CHANGE_HISTORY_ENABLED1Track changes to the document.
SC_CHANGE_HISTORY_MARKERS2Display changes in the margin using the SC_MARKNUM_HISTORY markers.
SC_CHANGE_HISTORY_INDICATORS4Display changes in the margin using the INDICATOR_HISTORY indicators.
+ +

There are default visuals assigned to each history marker and indicator but these may be overridden by the application.

+ +

Markers:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN21A change was made to this line and saved but then reverted to its original state. + This line is different to its state on disk.
SC_MARKNUM_HISTORY_SAVED22This line was modified and saved. This line is the same as its state on disk.
SC_MARKNUM_HISTORY_MODIFIED23This line was modified but not yet saved. This line is different to its state on disk.
SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED24A change was made to this line and saved but then reverted but not to its original state. + This line is different to its state on disk.
+ +

Indicators:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION36Text was deleted and saved but then reverted to its original state. + This text is not present on disk.
INDICATOR_HISTORY_REVERTED_TO_ORIGIN_DELETION37Text was inserted and saved but then reverted to its original state. + This range is different to its state on disk.
INDICATOR_HISTORY_SAVED_INSERTION38Text was inserted and saved. This text is the same as on disk.
INDICATOR_HISTORY_SAVED_DELETION39Text was deleted and saved. This range is the same as on disk.
INDICATOR_HISTORY_MODIFIED_INSERTION40Text was inserted but not yet saved. This text is not present on disk.
INDICATOR_HISTORY_MODIFIED_DELETION41Text was deleted but not yet saved. This range is different to its state on disk.
INDICATOR_HISTORY_REVERTED_TO_MODIFIED_INSERTION42Text was deleted and saved but then reverted but not to its original state. + This text is not present on disk.
INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION43Text was inserted and saved but then reverted but not to its original state. + This range is different to its state on disk.
+

Selection and information

Scintilla maintains a selection that stretches between two points, the anchor and the @@ -4990,7 +5131,10 @@ struct Sci_TextToFindFull { Scintilla in folding margins, and have symbolic names of the form SC_MARKNUM_*, for example SC_MARKNUM_FOLDEROPEN.

-

Marker numbers 0 to 24 have no pre-defined function; you can use them to mark syntax errors +

Marker numbers 21 to 24 are used for Change history if that is enabled but are + otherwise free for application use.

+ +

Marker numbers 0 to 20 have no pre-defined function; you can use them to mark syntax errors or the current point of execution, break points, or whatever you need marking. If you do not need folding, you can use all 32 for any purpose you wish.

@@ -5376,11 +5520,14 @@ struct Sci_TextToFindFull { They may also be invisible when used to track pieces of content for the application as INDIC_HIDDEN.

The SCI_INDIC* messages allow you to get and set the visual appearance of the - indicators. They all use an indicator argument in the range 0 to INDICATOR_MAX(35) + indicators. They all use an indicator argument in the range 0 to INDICATOR_MAX(43) to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use by lexers (0..7) a range for use by containers (8=INDICATOR_CONTAINER .. 31=INDICATOR_IME-1) - and a range for IME indicators (32=INDICATOR_IME .. 35=INDICATOR_IME_MAX).

+ a range for IME indicators (32=INDICATOR_IME .. 35=INDICATOR_IME_MAX) + and a range for Change history + (36=INDICATOR_HISTORY_REVERTED_TO_ORIGIN_INSERTION .. + 43=INDICATOR_HISTORY_REVERTED_TO_MODIFIED_DELETION).

The INDICATOR_* values used for dividing up indicators were previously INDIC_CONTAINER, INDIC_IME, -- cgit v1.2.3