aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 608201af7..46080557e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2060,7 +2060,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
ll->styles[styleInLine] = static_cast<char>(styleByte & styleMask);
ll->indicators[styleInLine] = static_cast<char>(styleByte & ~styleMask);
}
- styleByte = static_cast<char>((numCharsInLine ? ll->styles[numCharsInLine] : 0) & styleMask);
+ styleByte = static_cast<char>(((lineLength > 0) ? ll->styles[lineLength-1] : 0) & styleMask);
if (vstyle.someStylesForceCase) {
for (int charInLine = 0; charInLine<lineLength; charInLine++) {
char chDoc = ll->chars[charInLine];