diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 4 | ||||
-rw-r--r-- | src/Editor.cxx | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index c0290936f..34e6a99f3 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1522,8 +1522,8 @@ void Document::EnsureStyledTo(int pos) { IncrementStyleClock(); if (pli && !pli->UseContainerLexing()) { int lineEndStyled = LineFromPosition(GetEndStyled()); - int endStyled = LineStart(lineEndStyled); - pli->Colourise(endStyled, pos); + int endStyledTo = LineStart(lineEndStyled); + pli->Colourise(endStyledTo, pos); } else { // Ask the watchers to style, and stop as soon as one responds. for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) { diff --git a/src/Editor.cxx b/src/Editor.cxx index 865633be3..f792d160f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -705,14 +705,14 @@ void Editor::SetRectangularRange() { if (sel.selType == Selection::selThin) { xCaret = xAnchor; } - int lineAnchor = pdoc->LineFromPosition(sel.Rectangular().anchor.Position()); + int lineAnchorRect = pdoc->LineFromPosition(sel.Rectangular().anchor.Position()); int lineCaret = pdoc->LineFromPosition(sel.Rectangular().caret.Position()); - int increment = (lineCaret > lineAnchor) ? 1 : -1; - for (int line=lineAnchor; line != lineCaret+increment; line += increment) { + int increment = (lineCaret > lineAnchorRect) ? 1 : -1; + for (int line=lineAnchorRect; line != lineCaret+increment; line += increment) { SelectionRange range(SPositionFromLineX(line, xCaret), SPositionFromLineX(line, xAnchor)); if ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) == 0) range.ClearVirtualSpace(); - if (line == lineAnchor) + if (line == lineAnchorRect) sel.SetSelection(range); else sel.AddSelectionWithoutTrim(range); @@ -4733,7 +4733,6 @@ void Editor::Duplicate(bool forLine) { forLine = true; } UndoGroup ug(pdoc, sel.Count() > 1); - SelectionPosition last; const char *eol = ""; int eolLen = 0; if (forLine) { |