aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-11-19 13:48:37 +1100
committerNeil <nyamatongwe@gmail.com>2014-11-19 13:48:37 +1100
commitc1ce889ce992cf7006120c01c336fc51b44de9d1 (patch)
tree2995c377e0b35b1d389bd3c8875824dd65104650 /src/Editor.cxx
parent5007acf288a92f58c3d4a039a69b9baf50bed08b (diff)
downloadscintilla-mirror-c1ce889ce992cf7006120c01c336fc51b44de9d1.tar.gz
Platform overrides for some drawing and behaviour to benefit PLAT_CURSES.
From Mitchell Foral.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index bd15ac74e..64017c58d 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -113,6 +113,7 @@ Editor::Editor() {
mouseDownCaptures = true;
lastClickTime = 0;
+ doubleClickCloseThreshold = Point(3, 3);
dwellDelay = SC_TIME_FOREVER;
ticksToDwell = SC_TIME_FOREVER;
dwelling = false;
@@ -3777,10 +3778,10 @@ void Editor::GoToLine(int lineNo) {
EnsureCaretVisible();
}
-static bool Close(Point pt1, Point pt2) {
- if (abs(pt1.x - pt2.x) > 3)
+static bool Close(Point pt1, Point pt2, Point threshold) {
+ if (abs(pt1.x - pt2.x) > threshold.x)
return false;
- if (abs(pt1.y - pt2.y) > 3)
+ if (abs(pt1.y - pt2.y) > threshold.y)
return false;
return true;
}
@@ -4136,7 +4137,7 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie
if (shift && !inSelMargin) {
SetSelection(newPos);
}
- if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) {
+ if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick, doubleClickCloseThreshold)) {
//Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime);
SetMouseCapture(true);
if (FineTickerAvailable()) {