summaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-02-11 15:23:55 -0300
committercorvid <corvid@lavabit.com>2009-02-11 15:23:55 -0300
commitf65de3e6b2f8accbac3a8bba3e73370e5a95eac9 (patch)
tree9a84aa9bb6c6eb1c4095b275ac1f248a2c6d2145 /dw/textblock.cc
parentbc26fde9419c305ffc8e2bf69086d3d74bad23d7 (diff)
Fix for e28cf4b71832 (highlight starting with space)
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 8849483c..f7722559 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1369,21 +1369,6 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
yWorldBase + diff - word->style->font->ascent,
widthHL,
word->style->font->ascent + word->style->font->descent);
- if (widthHLSpace > 0) {
- core::style::Color *spaceBgColor;
-
- if (!(spaceBgColor = word->spaceStyle->backgroundColor))
- spaceBgColor = thisBgColor;
-
- view->drawRectangle (
- spaceBgColor,
- core::style::Color::SHADING_INVERSE,
- true, startHL + widthHL,
- yWorldBase + spaceDiff -word->spaceStyle->font->ascent,
- widthHLSpace,
- word->spaceStyle->font->ascent +
- word->spaceStyle->font->descent);
- }
/* Highlight the text. */
view->drawText (word->style->font,
color, core::style::Color::SHADING_INVERSE,
@@ -1395,12 +1380,27 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
decorateText(view, word, word->style,
core::style::Color::SHADING_INVERSE, startHL,
yWorldBase + diff, widthHL);
+ }
+ if (widthHLSpace > 0) {
+ core::style::Color *spaceBgColor;
+
+ if (!(spaceBgColor = word->spaceStyle->backgroundColor))
+ spaceBgColor = thisBgColor;
- if (widthHLSpace && word->spaceStyle->textDecoration)
+ view->drawRectangle (
+ spaceBgColor,
+ core::style::Color::SHADING_INVERSE,
+ true, startHL + widthHL,
+ yWorldBase + spaceDiff -word->spaceStyle->font->ascent,
+ widthHLSpace,
+ word->spaceStyle->font->ascent +
+ word->spaceStyle->font->descent);
+ if (word->spaceStyle->textDecoration) {
decorateText(view, word, word->spaceStyle,
core::style::Color::SHADING_INVERSE,
startHL + widthHL, yWorldBase + spaceDiff,
widthHLSpace);
+ }
}
}
}