diff options
author | nyamatongwe <unknown> | 2007-07-25 02:45:37 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2007-07-25 02:45:37 +0000 |
commit | 5ae581a400e6c410f5e611672fc3bbcc1df9a198 (patch) | |
tree | 8bfbeda92365295ea35c52ca32bf6ceb3df8f00a /src/Editor.cxx | |
parent | 45fddf64aa6d4cdfb403f21c7627a29d94f6b39f (diff) | |
download | scintilla-mirror-5ae581a400e6c410f5e611672fc3bbcc1df9a198.tar.gz |
Fixed bugs where caret was not shown at start of wrapped lines or was shown
at both the start of one line and the end of the previous line.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3373424da..b27775750 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2915,8 +2915,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Draw the Caret if (lineDoc == lineCaret) { int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); - if ((offset >= ll->LineStart(subLine)) && - ((offset < ll->LineStart(subLine + 1)) || offset == ll->numCharsInLine)) { + if (ll->InLine(offset, subLine)) { int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart; if (actualWrapVisualStartIndent != 0) { @@ -2945,7 +2944,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (widthOverstrikeCaret < 3) // Make sure its visible widthOverstrikeCaret = 3; - if (offset > 0) + if (offset > ll->LineStart(subLine)) caretWidthOffset = 1; // Move back so overlaps both character cells. if (posDrag >= 0) { /* Dragging text, use a line caret */ |