diff options
author | 2015-03-10 15:19:03 -0400 | |
---|---|---|
committer | 2015-03-10 15:19:03 -0400 | |
commit | 3690100a1730b43ef650489322f8b5379610aa01 (patch) | |
tree | 8850d48520304f4685d92925de79719567c089b0 | |
parent | 8907101cae680a017677288aff0dda4175a5e46f (diff) | |
download | textadept-3690100a1730b43ef650489322f8b5379610aa01.tar.gz textadept-3690100a1730b43ef650489322f8b5379610aa01.zip |
Patch Scintilla to fix tab stop calculations in curses; src/scintilla.patch
This patch was submitted upstream and should not be needed in the next release
of Scintilla.
-rw-r--r-- | src/scintilla.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/scintilla.patch b/src/scintilla.patch index 3b30a825..7890b89b 100644 --- a/src/scintilla.patch +++ b/src/scintilla.patch @@ -18,3 +18,38 @@ diff -r 5693714a8b0b src/Catalogue.cxx 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; |