aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-07-01 20:32:39 +1000
committernyamatongwe <devnull@localhost>2012-07-01 20:32:39 +1000
commitd8421fd881a326ab3baeb465a58fe5afff548b65 (patch)
treef67632be39e564a9dfaaf6c7bc644d52e63b907b /src
parent49dbca76d7e87fb020bbebf954c15bb66f43cb1e (diff)
downloadscintilla-mirror-d8421fd881a326ab3baeb465a58fe5afff548b65.tar.gz
Fix hang when Zero Width Space U+200B occurs at start of document.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 07f7beb39..c1f30e124 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3228,7 +3228,7 @@ void Editor::DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll,
// glyph / combining character. If so we'll need to draw that too.
int offsetFirstChar = offset;
int offsetLastChar = offset + (posAfter - posCaret);
- while ((offsetLastChar - numCharsToDraw) >= lineStart) {
+ while ((posBefore > 0) && ((offsetLastChar - numCharsToDraw) >= lineStart)) {
if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) {
// The char does not share horizontal space
break;