diff options
author | nyamatongwe <unknown> | 2012-05-26 14:17:25 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-05-26 14:17:25 +1000 |
commit | 0af9eecdbfe8e8260ef67316e7208e1385715c73 (patch) | |
tree | 8e79106b7ff753738a2e7e4dc8c69cea9c4c172b | |
parent | 9ccecdb500448a1aef27dab09c8e8e12798cb175 (diff) | |
download | scintilla-mirror-0af9eecdbfe8e8260ef67316e7208e1385715c73.tar.gz |
Relying on Document for position in line of line end characters.
-rw-r--r-- | src/Editor.cxx | 13 | ||||
-rw-r--r-- | src/SciTE.properties | 4 |
2 files changed, 5 insertions, 12 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3b3e1a99e..c3a4eafb4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2087,11 +2087,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou if (ll->validity == LineLayout::llCheckTextAndStyle) { int lineLength = posLineEnd - posLineStart; if (!vstyle.viewEOL) { - int cid = posLineEnd - 1; - while ((cid > posLineStart) && IsEOLChar(pdoc->CharAt(cid))) { - cid--; - lineLength--; - } + lineLength = pdoc->LineEnd(line) - posLineStart; } if (lineLength == ll->numCharsInLine) { // See if chars, styles, indicators, are all the same @@ -2148,10 +2144,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou const int lineLength = posLineEnd - posLineStart; pdoc->GetCharRange(ll->chars, posLineStart, lineLength); pdoc->GetStyleRange(ll->styles, posLineStart, lineLength); - int numCharsBeforeEOL = lineLength; - while ((numCharsBeforeEOL > 0) && IsEOLChar(ll->chars[numCharsBeforeEOL-1])) { - numCharsBeforeEOL--; - } + int numCharsBeforeEOL = pdoc->LineEnd(line) - posLineStart; const int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL; for (int styleInLine = 0; styleInLine < numCharsInLine; styleInLine++) { styleByte = ll->styles[styleInLine]; @@ -2355,7 +2348,7 @@ ColourDesired Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, } else { if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll->edgeColumn) && - !IsEOLChar(ll->chars[i])) + (i < ll->numCharsBeforeEOL)) return vsDraw.edgecolour; if (inHotspot && vsDraw.hotspotBackgroundSet) return vsDraw.hotspotBackground; diff --git a/src/SciTE.properties b/src/SciTE.properties index c323f52cf..1eda9fae4 100644 --- a/src/SciTE.properties +++ b/src/SciTE.properties @@ -2,5 +2,5 @@ # settings made in SciTEGlobal.properties command.build.directory.*.cxx=..\win32 command.build.directory.*.h=..\win32 -command.build.*.cxx=nmake -f scintilla.mak QUIET=1 DEBUG=0 -command.build.*.h=nmake -f scintilla.mak QUIET=1 DEBUG=0 +command.build.*.cxx=nmake -f scintilla.mak QUIET=1 +command.build.*.h=nmake -f scintilla.mak QUIET=1 |