]> git.eshelyaron.com Git - emacs.git/commitdiff
Set xterm click count to 1 even with no last click
authorAlexander Gramiak <agrambot@gmail.com>
Thu, 5 Oct 2017 10:50:02 +0000 (13:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 5 Oct 2017 10:50:02 +0000 (13:50 +0300)
* 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)

lisp/xt-mouse.el

index 772a72d5c50f9c51c6e28aad9b2b3111dd27d096..d268e1a3fe7d11eb72012a6724c0d670e8bc9eca 100644 (file)
@@ -288,8 +288,10 @@ which is the \"1006\" extension implemented in Xterm >= 277."
                        (string-match "down-" last-name)
                        (equal name (replace-match "" t t last-name)))
               (xterm-mouse--set-click-count event click-count)))
-           ((not last-time) nil)
-           ((and (> double-click-time (* 1000 (- this-time last-time)))
+           ((and last-time
+                 double-click-time
+                 (or (eq double-click-time t)
+                     (> double-click-time (* 1000 (- this-time last-time))))
                  (equal last-name (replace-match "" t t name)))
             (setq click-count (1+ click-count))
             (xterm-mouse--set-click-count event click-count))