diff options
| author | Alexander Gramiak | 2017-10-05 13:50:02 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-10-05 13:50:02 +0300 |
| commit | c625fb645afc75fb2b2ece771feb9472937c192d (patch) | |
| tree | 3bb0415c72d2035654a5c0ab7a00ce4a15ca57fd | |
| parent | e3f4b71c9de72bce59b4b7cb71627b626e82b573 (diff) | |
| download | emacs-c625fb645afc75fb2b2ece771feb9472937c192d.tar.gz emacs-c625fb645afc75fb2b2ece771feb9472937c192d.zip | |
Set xterm click count to 1 even with no last click
* lisp/xt-mouse.el (xterm-mouse-event): Move the check for
the last click so that click-count is initialized properly.
Handle the value of t for double-click-time.
(Bug#28658)
| -rw-r--r-- | lisp/xt-mouse.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 772a72d5c50..d268e1a3fe7 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -288,8 +288,10 @@ which is the \"1006\" extension implemented in Xterm >= 277." | |||
| 288 | (string-match "down-" last-name) | 288 | (string-match "down-" last-name) |
| 289 | (equal name (replace-match "" t t last-name))) | 289 | (equal name (replace-match "" t t last-name))) |
| 290 | (xterm-mouse--set-click-count event click-count))) | 290 | (xterm-mouse--set-click-count event click-count))) |
| 291 | ((not last-time) nil) | 291 | ((and last-time |
| 292 | ((and (> double-click-time (* 1000 (- this-time last-time))) | 292 | double-click-time |
| 293 | (or (eq double-click-time t) | ||
| 294 | (> double-click-time (* 1000 (- this-time last-time)))) | ||
| 293 | (equal last-name (replace-match "" t t name))) | 295 | (equal last-name (replace-match "" t t name))) |
| 294 | (setq click-count (1+ click-count)) | 296 | (setq click-count (1+ click-count)) |
| 295 | (xterm-mouse--set-click-count event click-count)) | 297 | (xterm-mouse--set-click-count event click-count)) |