diff options
author | nyamatongwe <devnull@localhost> | 2012-09-19 22:42:10 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-09-19 22:42:10 +1000 |
commit | c862ae240c3d5871f6c4cce6d803176edf2cc14b (patch) | |
tree | 4300ba950fa4b1531be584211c09565985d43a6a | |
parent | dea2c5b9bbbce473bc8baa886eddf4f7019d39f3 (diff) | |
download | scintilla-mirror-c862ae240c3d5871f6c4cce6d803176edf2cc14b.tar.gz |
Allow subclasses to modify padding when last segment on line is italics.
Used by ncurses platform layer.
From Mitchell Foral.
-rw-r--r-- | src/Editor.cxx | 3 | ||||
-rw-r--r-- | src/Editor.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 2b2b1785d..bb23e9e6d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -220,6 +220,7 @@ Editor::Editor() { marginNumberPadding = 3; ctrlCharPadding = 3; // +3 For a blank on front and rounded edge each side + lastSegItalicsOffset = 2; hsStart = -1; hsEnd = -1; @@ -2243,7 +2244,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } // Small hack to make lines that end with italics not cut off the edge of the last character if ((startseg > 0) && lastSegItalics) { - ll->positions[startseg] += 2; + ll->positions[startseg] += lastSegItalicsOffset; } ll->numCharsInLine = numCharsInLine; ll->numCharsBeforeEOL = numCharsBeforeEOL; diff --git a/src/Editor.h b/src/Editor.h index cb1141b61..e040bdb47 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -271,6 +271,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int marginNumberPadding; // the right-side padding of the number margin int ctrlCharPadding; // the padding around control character text blobs + int lastSegItalicsOffset; // the offset so as not to clip italic characters at EOLs Document *pdoc; |