From 5ae581a400e6c410f5e611672fc3bbcc1df9a198 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 25 Jul 2007 02:45:37 +0000 Subject: Fixed bugs where caret was not shown at start of wrapped lines or was shown at both the start of one line and the end of the previous line. --- src/PositionCache.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/PositionCache.cxx') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 13140b779..354dddd1a 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -126,6 +126,11 @@ int LineLayout::LineLastVisible(int line) const { } } +bool LineLayout::InLine(int offset, int line) const { + return ((offset >= LineStart(line)) && (offset < LineStart(line + 1)) || + ((offset == numCharsInLine) && (line == (lines-1)))); +} + void LineLayout::SetLineStart(int line, int start) { if ((line >= lenLineStarts) && (line != 0)) { int newMaxLines = line + 20; -- cgit v1.2.3