diff options
author | nyamatongwe <unknown> | 2012-07-01 20:32:39 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-07-01 20:32:39 +1000 |
commit | c608f5f369418ec7942f1e5cd1616116896ea3f7 (patch) | |
tree | ade04e7b9bf3c93fa320d71b78ee037860ae3d2d | |
parent | f9f93edaf8d7a70eb61ea86e7b10e5f1958af92f (diff) | |
download | scintilla-mirror-c608f5f369418ec7942f1e5cd1616116896ea3f7.tar.gz |
Fix hang when Zero Width Space U+200B occurs at start of document.
-rw-r--r-- | src/Editor.cxx | 2 |
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; |