diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-11-03 08:00:52 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-11-03 08:00:52 +1100 |
| commit | 5d67cf8a95eeb492c3989a6c81daedad7b4a05f3 (patch) | |
| tree | de9edee5d0b9305683e3b4096224ff1783d6ef33 /src/Editor.cxx | |
| parent | 03782fcb79245045d198632700aa54b4ded2b640 (diff) | |
| download | scintilla-mirror-5d67cf8a95eeb492c3989a6c81daedad7b4a05f3.tar.gz | |
Backport: Bug [#2130]. Setting rectangular selection made faster by reusing surface.
Backport of changeset 7758:703e30efe7bf.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index cb7269685..b26d19c8b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -591,8 +591,11 @@ void Editor::SetRectangularRange() { const Sci::Line lineCaret = pdoc->SciLineFromPosition(sel.Rectangular().caret.Position()); const int increment = (lineCaret > lineAnchorRect) ? 1 : -1; + AutoSurface surface(this); for (Sci::Line line=lineAnchorRect; line != lineCaret+increment; line += increment) { - SelectionRange range(SPositionFromLineX(line, xCaret), SPositionFromLineX(line, xAnchor)); + SelectionRange range( + view.SPositionFromLineX(surface, *this, line, xCaret, vs), + view.SPositionFromLineX(surface, *this, line, xAnchor, vs)); if ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) == 0) range.ClearVirtualSpace(); if (line == lineAnchorRect) |
