From 2e4a7d1e3454a5b1eeef5d661dfcf5ceeca332c7 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 12 Aug 2013 16:22:21 +1000 Subject: Feature: [feature-requests:#1007]. Fix bugs with redrawing selection. From Neomi. --- doc/ScintillaHistory.html | 6 ++++++ src/Editor.cxx | 2 ++ 2 files changed, 8 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 999141df8..a041e9e18 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -468,6 +468,12 @@ Bug #1512.
  • + Ensure selection redrawn correctly in two cases. + When switching from stream to rectangular selection with Alt+Shift+Up. + When reducing the range of an additional selection by moving mouse up. + Feature #1007. +
  • +
  • Copy and paste of rectangular selections compatible with Borland Delphi IDE on Windows. Feature #1002. Bug #1513. diff --git a/src/Editor.cxx b/src/Editor.cxx index 7c1d91c28..45a88711f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -980,6 +980,7 @@ int Editor::MovePositionTo(SelectionPosition newPos, Selection::selTypes selt, b } if (!sel.IsRectangular() && (selt == Selection::selRectangle)) { // Switching to rectangular + InvalidateSelection(sel.RangeMain(), false); SelectionRange rangeMain = sel.RangeMain(); sel.Clear(); sel.Rectangular() = rangeMain; @@ -6532,6 +6533,7 @@ void Editor::ButtonMove(Point pt) { sel.Rectangular() = SelectionRange(movePos, sel.Rectangular().anchor); SetSelection(movePos, sel.RangeMain().anchor); } else if (sel.Count() > 1) { + InvalidateSelection(sel.RangeMain(), false); SelectionRange range(movePos, sel.RangeMain().anchor); sel.TentativeSelection(range); InvalidateSelection(range, true); -- cgit v1.2.3