From 20b58d60c083e55117401bb8816f59f2711fc5b7 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 24 Feb 2018 21:15:15 -0500 Subject: Backported fix for rect and line selection movements from upstream Scintilla. --- src/scintilla_backports/6456_eaa6c7fa1a81.patch | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/scintilla_backports/6456_eaa6c7fa1a81.patch (limited to 'src/scintilla_backports/6456_eaa6c7fa1a81.patch') diff --git a/src/scintilla_backports/6456_eaa6c7fa1a81.patch b/src/scintilla_backports/6456_eaa6c7fa1a81.patch new file mode 100644 index 00000000..81032495 --- /dev/null +++ b/src/scintilla_backports/6456_eaa6c7fa1a81.patch @@ -0,0 +1,56 @@ +# HG changeset patch +# User Vicente +# Date 1518837132 -39600 +# Node ID eaa6c7fa1a811bd10abe19124335e984e50a67e5 +# Parent b9e27867752769a2cb7057cab8942baf4850757b +For rectangular selections, pressing Home or End now moves the caret to the Home +or End position instead of the limit of the rectangular selection. + +diff -r b9e278677527 -r eaa6c7fa1a81 doc/ScintillaHistory.html +--- a/doc/ScintillaHistory.html Sat Feb 17 11:28:52 2018 +1100 ++++ b/doc/ScintillaHistory.html Sat Feb 17 14:12:12 2018 +1100 +@@ -540,6 +540,10 @@ + Released 12 February 2018. + +
  • ++ For rectangular selections, pressing Home or End now moves the caret to the Home or End ++ position instead of the limit of the rectangular selection. ++
  • ++
  • + SciTE on Windows can execute Python scripts directly by name when on path. + Feature #1209. +
  • +diff -r b9e278677527 -r eaa6c7fa1a81 src/Editor.cxx +--- a/src/Editor.cxx Sat Feb 17 11:28:52 2018 +1100 ++++ b/src/Editor.cxx Sat Feb 17 14:12:12 2018 +1100 +@@ -3359,8 +3359,19 @@ + SetRectangularRange(); + } else if (sel.IsRectangular()) { + // Not a rectangular extension so switch to stream. +- const SelectionPosition selAtLimit = +- (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start; ++ SelectionPosition selAtLimit = (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start; ++ switch (iMessage) { ++ case SCI_HOME: ++ selAtLimit = SelectionPosition( ++ static_cast(pdoc->LineStart(pdoc->LineFromPosition(selAtLimit.Position())))); ++ break; ++ case SCI_VCHOME: ++ selAtLimit = SelectionPosition(pdoc->VCHomePosition(selAtLimit.Position())); ++ break; ++ case SCI_LINEEND: ++ selAtLimit = SelectionPosition(pdoc->LineEndPosition(selAtLimit.Position())); ++ break; ++ } + sel.selType = Selection::selStream; + sel.SetSelection(SelectionRange(selAtLimit)); + } else { +@@ -7537,7 +7548,7 @@ + std::vector().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible + InvalidateStyleRedraw(); + break; +- ++ + case SCI_GETACCESSIBILITY: + return SC_ACCESSIBILITY_DISABLED; + -- cgit v1.2.3