aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-08-22 03:13:47 +0000
committernyamatongwe <devnull@localhost>2000-08-22 03:13:47 +0000
commitf239a59953d1e3f1b3dc8c7f8de92aebc4cfb8a2 (patch)
tree179484a3ebba2fe05ba2ae635aa43f4935a6e901 /src/Editor.cxx
parent89ef99c7fdf9312d4c2f8b9e822a2060dc344ed7 (diff)
downloadscintilla-mirror-f239a59953d1e3f1b3dc8c7f8de92aebc4cfb8a2.tar.gz
Added SCE_H_VALUE class for HTML for unquoted values.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 6969458d3..e6f44f5df 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1230,12 +1230,14 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
if (line == lineCaret) {
int offset = Platform::Minimum(posCaret - posLineStart, LineLayout::maxLineLength);
int xposCaret = ll.positions[offset] + xStart;
- int widthOverstrikeCaret =
- ll.positions[offset + 1] - ll.positions[offset];
- if (posCaret == pdoc->Length()) // At end of document
+ int widthOverstrikeCaret = 1;
+ if (posCaret == pdoc->Length()) { // At end of document
widthOverstrikeCaret = vs.aveCharWidth;
- if ((posCaret - posLineStart) >= ll.numCharsInLine) // At end of line
+ } else if ((posCaret - posLineStart) >= ll.numCharsInLine) { // At end of line
widthOverstrikeCaret = vs.aveCharWidth;
+ } else {
+ widthOverstrikeCaret = ll.positions[offset + 1] - ll.positions[offset];
+ }
if (widthOverstrikeCaret < 3) // Make sure its visible
widthOverstrikeCaret = 3;
if (((caret.active && caret.on) || (posDrag >= 0)) && xposCaret >= 0) {