diff options
| author | nyamatongwe <unknown> | 2009-08-26 10:50:03 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-08-26 10:50:03 +0000 | 
| commit | a98dc4fbced60a016511e407ebc77eb37ec3b8cf (patch) | |
| tree | 36e38661c840b87ee0377cb799738ed4e4bcaa12 | |
| parent | 275e0c25ae6cf1568099509682417b1c8ae60911 (diff) | |
| download | scintilla-mirror-a98dc4fbced60a016511e407ebc77eb37ec3b8cf.tar.gz | |
Caret is now visible even when it is at the start of the line and is not
before the first character which could occur if there was a zero-width
character at the start of the line.
| -rw-r--r-- | src/Editor.cxx | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 2d438e8db..b1065b77e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3097,7 +3097,7 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS  		const int spaceWidth = static_cast<int>(vsDraw.styles[ll->EndLineStyle()].spaceWidth);  		const int virtualOffset = posCaret.VirtualSpace() * spaceWidth;  		if (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) { -			int xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)] + xStart; +			int xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)];  			if (ll->wrapIndent != 0) {  				int lineStart = ll->LineStart(subLine);  				if (lineStart != 0)	// Wrapped @@ -3124,8 +3124,9 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS  				if (widthOverstrikeCaret < 3)	// Make sure its visible  					widthOverstrikeCaret = 3; -				if (posCaret > SelectionPosition(ll->LineStart(subLine) + posLineStart)) +				if (xposCaret > 0)  					caretWidthOffset = 1;	// Move back so overlaps both character cells. +				xposCaret += xStart;  				if (posDrag.IsValid()) {  					/* Dragging text, use a line caret */  					rcCaret.left = xposCaret - caretWidthOffset; | 
