1Scintilla changes:
2
3* Hijack SCI_LOADLEXERLIBRARY for programmatically setting input method.
4  This is helpful on newer versions of macOS, where changing the input method is
5  flaky.
6* Update DrawTabArrowFn() signature in order to draw strikeout tabs.
7* Handle leading whitespace in XPM images in order to prevent crashes.
8
9diff -r 6e368ee248e4 gtk/ScintillaGTK.cxx
10--- a/gtk/ScintillaGTK.cxx	Fri Oct 26 11:06:34 2018 -0400
11+++ b/gtk/ScintillaGTK.cxx	Sun Nov 25 00:20:58 2018 -0500
12@@ -821,6 +821,11 @@
13 		case SCI_GETDIRECTPOINTER:
14 			return reinterpret_cast<sptr_t>(this);
15
16+		case SCI_LOADLEXERLIBRARY:
17+			// Hijack this interface to programmatically set input method.
18+			gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(im_context), ConstCharPtrFromSPtr(lParam));
19+			break;
20+
21 		case SCI_TARGETASUTF8:
22 			return TargetAsUTF8(CharPtrFromSPtr(lParam));
23
24diff -r 22b6bbb36280 src/EditView.cxx
25--- a/src/EditView.cxx	Sat Sep 05 07:55:08 2020 +1000
26+++ b/src/EditView.cxx	Fri Oct 02 19:34:46 2020 -0400
27@@ -1951,7 +1951,7 @@
28 							if (!customDrawTabArrow)
29 								DrawTabArrow(surface, rcTab, segmentTop, vsDraw);
30 							else
31-								customDrawTabArrow(surface, rcTab, segmentTop);
32+								customDrawTabArrow(surface, rcTab, segmentTop, vsDraw);
33 						}
34 					}
35 				} else {
36diff -r 22b6bbb36280 src/EditView.h
37--- a/src/EditView.h	Sat Sep 05 07:55:08 2020 +1000
38+++ b/src/EditView.h	Fri Oct 02 19:34:46 2020 -0400
39@@ -40,7 +40,7 @@
40 void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText,
41 	const StyledText &st, size_t start, size_t length, DrawPhase phase);
42
43-typedef void (*DrawTabArrowFn)(Surface *surface, PRectangle rcTab, int ymid);
44+typedef void (*DrawTabArrowFn)(Surface *surface, PRectangle rcTab, int ymid, const ViewStyle &vsDraw);
45
46 class LineTabstops;
47
48diff -r 22b6bbb36280 src/XPM.cxx
49--- a/src/XPM.cxx	Sat Sep 05 07:55:08 2020 +1000
50+++ b/src/XPM.cxx	Fri Oct 02 20:32:13 2020 -0400
51@@ -92,6 +92,9 @@
52 void XPM::Init(const char *textForm) {
53 	// Test done is two parts to avoid possibility of overstepping the memory
54 	// if memcmp implemented strangely. Must be 4 bytes at least at destination.
55+	while (*textForm == ' ') {
56+		textForm++;
57+	}
58 	if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) {
59 		// Build the lines form out of the text form
60 		std::vector<const char *> linesForm = LinesFormFromTextForm(textForm);
61