Browse Source

Update to Scintilla 3.0.0. Includes the fix from https://sourceforge.net/p/scintilla/code/ci/1bb3e86c576b0334ccbd7ac2fd69c4a48909e41f/ which actually is part of 3.6.3.

Martijn Laan 1 year ago
parent
commit
70a272ee8d
4 changed files with 39 additions and 10 deletions
  1. 4 7
      Components/ScintEdit.pas
  2. 35 2
      Components/ScintInt.pas
  3. BIN
      Files/isscint.dll
  4. 0 1
      Projects/Src/CompScintEdit.pas

+ 4 - 7
Components/ScintEdit.pas

@@ -1351,10 +1351,6 @@ begin
     var Pos := SelectionCaretPosition[Selection];
     SelectionAnchorPosition[Selection] := Pos;
   end;
-  { Workaround Scintilla bug which was fixed in
-    https://sourceforge.net/p/scintilla/code/ci/1bb3e86c576b0334ccbd7ac2fd69c4a48909e41f/ }
-  if Assigned(FOnUpdateUI) then
-    FOnUpdateUI(Self, [suSelection]);
 end;
 
 procedure TScintEdit.SetFillSelectionToEdge(const Value: Boolean);
@@ -1452,12 +1448,13 @@ procedure TScintEdit.SetSingleSelection(const CaretPos, AnchorPos: Integer);
 begin
   Call(SCI_SETSELECTION, CaretPos, AnchorPos);
   { Scintilla should now send SCN_UPDATEUI with SC_UPDATE_SELECTION but doesn't,
-    not sure which commit fixes this (if any). It isn't
+    not sure which commit fixes this (if any). It isn't the following commit which
+    has already been applied to isscint.dll:
     https://sourceforge.net/p/scintilla/code/ci/1bb3e86c576b0334ccbd7ac2fd69c4a48909e41f/
     The test to see if its fixed:
     -Open Debug.iss
-    -Rectangular block select (Alt+Drag) part of both MessagesFile parameters
-    -Hit Esc once
+    -Rectangular block select (Alt+Drag) part of *both* MessagesFile parameters
+    -Hit Esc once to revert the two selections into a single one
     -Word at cursor highlighting should now be active again - without the
      workaround below it isn't }
   if Assigned(FOnUpdateUI) then

+ 35 - 2
Components/ScintInt.pas

@@ -1,7 +1,7 @@
 unit ScintInt;
 
 {
-  Delphi translation of Scintilla.h from Scintilla 2.26
+  Delphi translation of Scintilla.h from Scintilla 3.0.0
   created by Jordan Russell and updated by Martijn Laan
 }
 
@@ -60,7 +60,6 @@ const
   SCI_GETTABWIDTH = 2121;
   SC_CP_UTF8 = 65001;
   SCI_SETCODEPAGE = 2037;
-  SCI_SETUSEPALETTE = 2039;
   MARKER_MAX = 31;
   SC_MARK_CIRCLE = 0;
   SC_MARK_ROUNDRECT = 1;
@@ -92,6 +91,7 @@ const
   SC_MARK_LEFTRECT = 27;
   SC_MARK_AVAILABLE = 28;
   SC_MARK_UNDERLINE = 29;
+  SC_MARK_RGBAIMAGE = 30;
   SC_MARK_CHARACTER = 10000;
   SC_MARKNUM_FOLDEREND = 25;
   SC_MARKNUM_FOLDEROPENMID = 26;
@@ -188,6 +188,14 @@ const
   SCI_STYLEGETCHANGEABLE = 2492;
   SCI_STYLEGETHOTSPOT = 2493;
   SCI_STYLESETCASE = 2060;
+  SC_FONT_SIZE_MULTIPLIER = 100;
+  SCI_STYLESETSIZEFRACTIONAL = 2061;
+  SCI_STYLEGETSIZEFRACTIONAL = 2062;
+  SC_WEIGHT_NORMAL = 400;
+  SC_WEIGHT_SEMIBOLD = 600;
+  SC_WEIGHT_BOLD = 700;
+  SCI_STYLESETWEIGHT = 2063;
+  SCI_STYLEGETWEIGHT = 2064;
   SCI_STYLESETCHARACTERSET = 2066;
   SCI_STYLESETHOTSPOT = 2409;
   SCI_SETSELFORE = 2067;
@@ -216,6 +224,10 @@ const
   INDIC_BOX = 6;
   INDIC_ROUNDBOX = 7;
   INDIC_STRAIGHTBOX = 8;
+  INDIC_DASH = 9;
+  INDIC_DOTS = 10;
+  INDIC_SQUIGGLELOW = 11;
+  INDIC_DOTBOX = 12;
   INDIC_MAX = 31;
   INDIC_CONTAINER = 8;
   INDIC0_MASK = $20;
@@ -299,6 +311,7 @@ const
   SCI_GETSELECTIONSTART = 2143;
   SCI_SETSELECTIONEND = 2144;
   SCI_GETSELECTIONEND = 2145;
+  SCI_SETEMPTYSELECTION = 2556;
   SCI_SETPRINTMAGNIFICATION = 2146;
   SCI_GETPRINTMAGNIFICATION = 2147;
   SC_PRINT_NORMAL = 0;
@@ -371,6 +384,7 @@ const
   SCI_CALLTIPSETFORE = 2206;
   SCI_CALLTIPSETFOREHLT = 2207;
   SCI_CALLTIPUSESTYLE = 2212;
+  SCI_CALLTIPSETPOSITION = 2213;
   SCI_VISIBLEFROMDOCLINE = 2220;
   SCI_DOCLINEFROMVISIBLE = 2221;
   SCI_WRAPCOUNT = 2235;
@@ -385,6 +399,7 @@ const
   SCI_SHOWLINES = 2226;
   SCI_HIDELINES = 2227;
   SCI_GETLINEVISIBLE = 2228;
+  SCI_GETALLLINESVISIBLE = 2236;
   SCI_SETFOLDEXPANDED = 2229;
   SCI_GETFOLDEXPANDED = 2230;
   SCI_TOGGLEFOLD = 2231;
@@ -696,6 +711,10 @@ const
   SCI_MARGINTEXTCLEARALL = 2536;
   SCI_MARGINSETSTYLEOFFSET = 2537;
   SCI_MARGINGETSTYLEOFFSET = 2538;
+  SC_MARGINOPTION_NONE = 0;
+  SC_MARGINOPTION_SUBLINESELECT = 1;
+  SCI_SETMARGINOPTIONS = 2539;
+  SCI_GETMARGINOPTIONS = 2557;
   SCI_ANNOTATIONSETTEXT = 2540;
   SCI_ANNOTATIONGETTEXT = 2541;
   SCI_ANNOTATIONSETSTYLE = 2542;
@@ -769,6 +788,19 @@ const
   SCI_VERTICALCENTRECARET = 2619;
   SCI_MOVESELECTEDLINESUP = 2620;
   SCI_MOVESELECTEDLINESDOWN = 2621;
+  SCI_SETIDENTIFIER = 2622;
+  SCI_GETIDENTIFIER = 2623;
+  SCI_RGBAIMAGESETWIDTH = 2624;
+  SCI_RGBAIMAGESETHEIGHT = 2625;
+  SCI_MARKERDEFINERGBAIMAGE = 2626;
+  SCI_REGISTERRGBAIMAGE = 2627;
+  SCI_SCROLLTOSTART = 2628;
+  SCI_SCROLLTOEND = 2629;
+  SC_TECHNOLOGY_DEFAULT = 0;
+  SC_TECHNOLOGY_DIRECTWRITE = 1;
+  SCI_SETTECHNOLOGY = 2630;
+  SCI_GETTECHNOLOGY = 2631;
+  SCI_CREATELOADER = 2632;
   SCI_STARTRECORD = 3001;
   SCI_STOPRECORD = 3002;
   SCI_SETLEXER = 4001;
@@ -845,6 +877,7 @@ const
   SCMOD_CTRL = 2;
   SCMOD_ALT = 4;
   SCMOD_SUPER = 8;
+  SCMOD_META = 16;
   SCN_STYLENEEDED = 2000;
   SCN_CHARADDED = 2001;
   SCN_SAVEPOINTREACHED = 2002;

BIN
Files/isscint.dll


+ 0 - 1
Projects/Src/CompScintEdit.pas

@@ -150,7 +150,6 @@ begin
      "The INDICATOR_* values used for dividing up indicators were previously
       INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX"
      Once it does replace our use of these INDIC_* with INDICATOR_*.
-    -2.2.7: Start using SCI_SETEMPTYSELECTION
     -2.2.8: Review using SCI_MARKERDEFINERGBAIMAGE instead of SCI_MARKERDEFINEPIXMAP,
             but note INDIC_SQUIGGLEPIXMAP below
     -3.3.2: Review using INDIC_SQUIGGLEPIXMAP instead of INDIC_SQUIGGLE