aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-08-10 02:57:17 +0000
committernyamatongwe <unknown>2001-08-10 02:57:17 +0000
commitcdfb090f2206c87a86dd5e55560ed853db39f983 (patch)
treedb214e22d0e5c9e6d08faa2440b6be86b0551b0c /src/Editor.cxx
parent349377f2a1f612b39c0f0e8dc6bf17c1154e4e56 (diff)
downloadscintilla-mirror-cdfb090f2206c87a86dd5e55560ed853db39f983.tar.gz
Typing makes the dwell not occur again until the mouse moves.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx11
1 files changed, 7 insertions, 4 deletions
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);