diff options
author | nyamatongwe <unknown> | 2008-11-21 04:14:13 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2008-11-21 04:14:13 +0000 |
commit | fdbd988740df967f41cb5d7dbff50fc9bc4ec28f (patch) | |
tree | 510d1ecc7aa2a8290883c474ad702db12c3c8444 /src | |
parent | e79cb46e41ed31eea4075ffad48862225e615d79 (diff) | |
download | scintilla-mirror-fdbd988740df967f41cb5d7dbff50fc9bc4ec28f.tar.gz |
Patch from twhiteman for bug #2126144 wrapping with CARETSTYLE_BLOCK caret
problems.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index ffc2dee22..8910a5b53 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2693,8 +2693,15 @@ void Editor::DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, } // We now know what to draw, update the caret drawing rectangle - rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[ll->LineStart(subLine)] + xStart; - rcCaret.right = ll->positions[offsetFirstChar+numCharsToDraw] - ll->positions[ll->LineStart(subLine)] + xStart; + rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[lineStart] + xStart; + rcCaret.right = ll->positions[offsetFirstChar+numCharsToDraw] - ll->positions[lineStart] + xStart; + + // Adjust caret position to take into account any word wrapping symbols. + if ((actualWrapVisualStartIndent != 0) && (lineStart != 0)) { + int wordWrapCharWidth = actualWrapVisualStartIndent * vs.aveCharWidth; + rcCaret.left += wordWrapCharWidth; + rcCaret.right += wordWrapCharWidth; + } // This character is where the caret block is, we override the colours // (inversed) for drawing the caret here. |