diff options
-rw-r--r-- | src/Document.cxx | 3 | ||||
-rw-r--r-- | src/Editor.cxx | 2 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 5 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 2 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 5d9e10c40..a35105669 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2404,8 +2404,7 @@ void Document::EnsureStyledTo(Sci::Position pos) { if ((enteredStyling == 0) && (pos > GetEndStyled())) { IncrementStyleClock(); if (pli && !pli->UseContainerLexing()) { - const Sci::Line lineEndStyled = SciLineFromPosition(GetEndStyled()); - const Sci::Position endStyledTo = LineStart(lineEndStyled); + const Sci::Position endStyledTo = LineStartPosition(GetEndStyled()); pli->Colourise(endStyledTo, pos); } else { // Ask the watchers to style, and stop as soon as one responds. diff --git a/src/Editor.cxx b/src/Editor.cxx index 796279871..0b65041d2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3750,7 +3750,7 @@ int Editor::DelWordOrLine(Message iMessage) { case Message::DelLineRight: rangeDelete = Range( sel.Range(r).caret.Position(), - pdoc->LineEnd(pdoc->LineFromPosition(sel.Range(r).caret.Position()))); + pdoc->LineEndPosition(sel.Range(r).caret.Position())); break; default: break; diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 9d0c79c06..a629cdd33 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -804,10 +804,7 @@ const char *LexState::DescriptionOfStyle(int style) { void ScintillaBase::NotifyStyleToNeeded(Sci::Position endStyleNeeded) { if (!DocumentLexState()->UseContainerLexing()) { - const Sci::Line lineEndStyled = - pdoc->SciLineFromPosition(pdoc->GetEndStyled()); - const Sci::Position endStyled = - pdoc->LineStart(lineEndStyled); + const Sci::Position endStyled = pdoc->LineStartPosition(pdoc->GetEndStyled()); DocumentLexState()->Colourise(endStyled, endStyleNeeded); return; } diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index be910d0f9..7ff979bbf 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -3135,7 +3135,7 @@ LRESULT ScintillaWin::ImeOnReconvert(LPARAM lParam) { } else { // Ensure docCompStart+docCompLen be not beyond lineEnd. // since docCompLen by byte might break eol. - const Sci::Position lineEnd = pdoc->LineEnd(pdoc->LineFromPosition(rBase)); + const Sci::Position lineEnd = pdoc->LineEndPosition(rBase); const Sci::Position overflow = (docCompStart + docCompLen) - lineEnd; if (overflow > 0) { pdoc->DeleteChars(docCompStart, docCompLen - overflow); |