diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-11-19 13:48:37 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-11-19 13:48:37 +1100 |
| commit | 3abacf188f611b460ad08818e2339c77f3ad85a5 (patch) | |
| tree | 94deae5111f5c098781cde15ce415888f48ff0aa /src/Editor.cxx | |
| parent | e9852dc1ceb2756b10ec6ab6b2238346e883e115 (diff) | |
| download | scintilla-mirror-3abacf188f611b460ad08818e2339c77f3ad85a5.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.cxx | 9 |
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()) { |
