From 3a1af4ce66bfc718c0cdba34716a46586d8eacfb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 10 Aug 2001 02:57:17 +0000 Subject: Typing makes the dwell not occur again until the mouse moves. --- src/Editor.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index fb765d430..600938fa3 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2561,7 +2561,7 @@ int Editor::KeyDefault(int, int) { } int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) { - DwellEnd(); + DwellEnd(false); int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); int msg = kmap.Find(key, modifiers); @@ -3007,8 +3007,11 @@ void Editor::LineSelection(int lineCurrent_, int lineAnchor_) { } } -void Editor::DwellEnd() { - ticksToDwell = dwellDelay; +void Editor::DwellEnd(bool mouseMoved) { + if (mouseMoved) + ticksToDwell = dwellDelay; + else + ticksToDwell = SC_TIME_FOREVER; if (dwelling && (dwellDelay < SC_TIME_FOREVER)) { dwelling = false; NotifyDwelling(ptMouseLast, dwelling); @@ -3124,7 +3127,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b void Editor::ButtonMove(Point pt) { if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { - DwellEnd(); + DwellEnd(true); } ptMouseLast = pt; //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); -- cgit v1.2.3