unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex <agrambot@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 28658@debbugs.gnu.org
Subject: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position
Date: Sun, 01 Oct 2017 12:30:23 -0600	[thread overview]
Message-ID: <878tgura9s.fsf@gmail.com> (raw)
In-Reply-To: <59D0A616.2000003@gmx.at> (martin rudalics's message of "Sun, 01 Oct 2017 10:23:50 +0200")

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

martin rudalics <rudalics@gmx.at> writes:

> +           ((and last-time
> +                 (> double-click-time (* 1000 (- this-time last-time)))
>
> Note that here and elsewhere coders assume that ‘double-click-time’ is a
> number.  However, it may be also nil or t and we should fix those
> instances eventually (see Bug#23419).  In new or changed code, at least.

Sure, here's a third patch to deal with that:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: boolean --]
[-- Type: text/x-diff, Size: 1034 bytes --]

From efb7f09f585d6652221f5e58e9bc635e6100a588 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <agrambot@gmail.com>
Date: Sun, 1 Oct 2017 12:21:19 -0600
Subject: [PATCH] * lisp/xt-mouse.el (xterm-mouse-event): Handle boolean
 double-click-time

---
 lisp/xt-mouse.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index cbbeec82fa..aa5aa0f7f5 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -291,7 +291,9 @@ xterm-mouse-event
                        (equal name (replace-match "" t t last-name)))
               (xterm-mouse--set-click-count event click-count)))
            ((and last-time
-                 (> double-click-time (* 1000 (- this-time last-time)))
+                 double-click-time
+                 (or (eq double-click-time t)
+                     (> double-click-time (* 1000 (- this-time last-time))))
                  (eq x last-x)
                  (eq y last-y)
                  (equal last-name (replace-match "" t t name)))
-- 
2.14.2


  reply	other threads:[~2017-10-01 18:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 22:06 bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Alex
2017-10-01  3:56 ` Alex
2017-10-01  8:23   ` martin rudalics
2017-10-01 18:30     ` Alex [this message]
2017-10-05 10:52       ` Eli Zaretskii
2017-10-05 10:52   ` Eli Zaretskii
2017-10-06  0:03     ` Alex
2017-10-06  7:44       ` Eli Zaretskii
2017-10-09  2:37         ` Alex
2017-10-09  7:11           ` Eli Zaretskii
2017-10-05 10:36 ` Eli Zaretskii
2017-10-06  0:14   ` Alex
2017-10-06  7:14     ` Eli Zaretskii
2017-10-07 21:57       ` Alex
2017-10-08  7:42         ` Eli Zaretskii
2017-10-08 23:44           ` Alex

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tgura9s.fsf@gmail.com \
    --to=agrambot@gmail.com \
    --cc=28658@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).