aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-07-09 16:37:39 +1000
committerNeil <nyamatongwe@gmail.com>2014-07-09 16:37:39 +1000
commit99b10e08e875d34e73b43743bda747bc17e76c9b (patch)
treeb4fb81cca1a89d8f7f06cb8e831740ea20d3b409
parent4fefc190c78006bc016bf0eb322bcedf7b84d08b (diff)
downloadscintilla-mirror-99b10e08e875d34e73b43743bda747bc17e76c9b.tar.gz
Ensure correct width used for overstrike caret for multi-byte character on GTK+
where the width is spread over the bytes in the positions array.
-rw-r--r--src/EditView.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 26ede6cd9..68a2c6ded 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -974,7 +974,8 @@ void EditView::DrawCarets(Surface *surface, const ViewStyle &vsDraw, int lineDoc
caretAtEOL = true;
widthOverstrikeCaret = vsDraw.aveCharWidth;
} else {
- widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset];
+ const int widthChar = model.pdoc->LenChar(posCaret.Position());
+ widthOverstrikeCaret = ll->positions[offset + widthChar] - ll->positions[offset];
}
if (widthOverstrikeCaret < 3) // Make sure its visible
widthOverstrikeCaret = 3;