aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-08-10 02:57:17 +0000
committernyamatongwe <devnull@localhost>2001-08-10 02:57:17 +0000
commit3a1af4ce66bfc718c0cdba34716a46586d8eacfb (patch)
treedb214e22d0e5c9e6d08faa2440b6be86b0551b0c /src
parent7c33542c6be6d25b133a4c560d14cb590b5178cb (diff)
downloadscintilla-mirror-3a1af4ce66bfc718c0cdba34716a46586d8eacfb.tar.gz
Typing makes the dwell not occur again until the mouse moves.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx11
-rw-r--r--src/Editor.h2
2 files changed, 8 insertions, 5 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);
diff --git a/src/Editor.h b/src/Editor.h
index 7b2c0e0a9..3d7c54e8e 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -309,7 +309,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool PointInSelection(Point pt);
bool PointInSelMargin(Point pt);
void LineSelection(int lineCurrent_, int lineAnchor_);
- void DwellEnd();
+ void DwellEnd(bool mouseMoved);
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void ButtonMove(Point pt);
void ButtonUp(Point pt, unsigned int curTime, bool ctrl);