aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-11-03 08:00:52 +1100
committerNeil <nyamatongwe@gmail.com>2019-11-03 08:00:52 +1100
commit78ac9f3ecf3ee474ea2e6c45ae32450a5b6d2ac4 (patch)
tree4686b76c739a973ea3699ffc3491f73e51db1902
parenta35b5ddc3e2513a44374340cd245b046aa084405 (diff)
downloadscintilla-mirror-78ac9f3ecf3ee474ea2e6c45ae32450a5b6d2ac4.tar.gz
Bug [#2130]. Setting rectangular selection made faster by reusing surface.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/Editor.cxx5
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 2c49c8c9f..d7312f008 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -583,6 +583,10 @@
<a href="https://sourceforge.net/p/scintilla/feature-requests/1304/">Feature #1304</a>.
</li>
<li>
+ Setting rectangular selection made faster.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2130/">Bug #2130</a>.
+ </li>
+ <li>
SciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language.
</li>
</ul>
diff --git a/src/Editor.cxx b/src/Editor.cxx
index dbcafeb89..d2b447d86 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -594,8 +594,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)