diff options
author | Neil <nyamatongwe@gmail.com> | 2014-07-09 16:37:39 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-07-09 16:37:39 +1000 |
commit | fd1c792acd7c13f6bfe6ce3957e8516c2eae1216 (patch) | |
tree | f12a864cc31facb132fa068380754e8c3a7d70ed /src/EditView.cxx | |
parent | 70f546bc803924c5c1ef4a4151ed4b4353268364 (diff) | |
download | scintilla-mirror-fd1c792acd7c13f6bfe6ce3957e8516c2eae1216.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.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 3 |
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; |