From 776e3578df31adcd07e73e1a89ec6525f4f149d2 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 24 Dec 2014 16:04:24 -0500 Subject: Patched Scintilla to fix curses margin intersection; src/scintilla.patch Clicking on the first character in a line caused Scintilla to think the line's margin was clicked, incorrectly selecting the entire line. --- src/scintilla.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/scintilla.patch b/src/scintilla.patch index 493fd538..f2d7935d 100644 --- a/src/scintilla.patch +++ b/src/scintilla.patch @@ -36,3 +36,15 @@ diff -r 326449de45d0 src/ScintillaBase.cxx rc.top += offset; rc.bottom += offset; } +diff -r a797ff255bdf src/Editor.cxx +--- a/src/Editor.cxx Sat Nov 29 12:42:58 2014 +1100 ++++ b/src/Editor.cxx Wed Dec 17 09:54:10 2014 -0500 +@@ -3998,7 +3998,7 @@ + // Really means: "Point in a margin" + if (vs.fixedColumnWidth > 0) { // There is a margin + PRectangle rcSelMargin = GetClientRectangle(); +- rcSelMargin.right = static_cast(vs.textStart - vs.leftMarginWidth); ++ rcSelMargin.right = static_cast(vs.textStart - (vs.leftMarginWidth > 0 ? vs.leftMarginWidth : 1)); + rcSelMargin.left = static_cast(vs.textStart - vs.fixedColumnWidth); + return rcSelMargin.Contains(pt); + } else { -- cgit v1.2.3