From 9232b666f1de9bbdf15bbf7e03edb8869110db2b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 16 Aug 2007 13:13:35 +0000 Subject: Make selection of first or second character on line work with a selection foreground set. --- src/PositionCache.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 5bdafc27e..1763b6530 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -126,7 +126,7 @@ int LineLayout::LineLastVisible(int line) const { } bool LineLayout::InLine(int offset, int line) const { - return ((offset >= LineStart(line)) && (offset < LineStart(line + 1)) || + return ((offset >= LineStart(line)) && (offset < LineStart(line + 1)) || ((offset == numCharsInLine) && (line == (lines-1)))); } @@ -345,7 +345,7 @@ void LineLayoutCache::Dispose(LineLayout *ll) { } void BreakFinder::Insert(int val) { - if (val > nextBreak) { + if (val >= nextBreak) { for (unsigned int j = 0; j