aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla.patch
blob: 7890b89be84d7f63576f4904e509aae30be2724e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
diff -r 5693714a8b0b src/Catalogue.cxx
--- a/src/Catalogue.cxx	Fri Dec 06 16:19:52 2013 +1100
+++ b/src/Catalogue.cxx	Sun Dec 15 21:21:20 2013 -0500
@@ -74,6 +74,7 @@
 // Shorten the code that declares a lexer and ensures it is linked in by calling a method.
 #define LINK_LEXER(lexer) extern LexerModule lexer; Catalogue::AddLexerModule(&lexer);
 
+#if 0
 //++Autogenerated -- run scripts/LexGen.py to regenerate
 //**\(\tLINK_LEXER(\*);\n\)
 	LINK_LEXER(lmA68k);
@@ -187,6 +188,8 @@
 	LINK_LEXER(lmYAML);
 
 //--Autogenerated -- end of automatically generated section
+#endif
+	LINK_LEXER(lmLPeg);
 
 	return 1;
 }
diff -r 16ffc2a3ae15 src/EditView.cxx
--- a/src/EditView.cxx	Thu Mar 05 08:03:52 2015 +1100
+++ b/src/EditView.cxx	Fri Mar 06 12:44:09 2015 -0500
@@ -173,6 +173,7 @@
 
 EditView::EditView() {
 	ldTabstops = NULL;
+	tabWidthMinimumPixels = 2; // needed for calculating tab stops for fractional proportional fonts
 	hideSelection = false;
 	drawOverstrikeCaret = true;
 	bufferedDraw = true;
@@ -220,10 +221,10 @@
 }
 
 XYPOSITION EditView::NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const {
-	int next = GetNextTabstop(line, static_cast<int>(x + 2));
+	int next = GetNextTabstop(line, static_cast<int>(x + tabWidthMinimumPixels));
 	if (next > 0)
 		return static_cast<XYPOSITION>(next);
-	return (static_cast<int>((x + 2) / tabWidth) + 1) * tabWidth;
+	return (static_cast<int>((x + tabWidthMinimumPixels) / tabWidth) + 1) * tabWidth;
 }
 
 bool EditView::ClearTabstops(int line) {
diff -r 16ffc2a3ae15 src/EditView.h
--- a/src/EditView.h	Thu Mar 05 08:03:52 2015 +1100
+++ b/src/EditView.h	Fri Mar 06 12:44:09 2015 -0500
@@ -51,6 +51,7 @@
 public:
 	PrintParameters printParameters;
 	PerLine *ldTabstops;
+	int tabWidthMinimumPixels;
 
 	bool hideSelection;
 	bool drawOverstrikeCaret;