From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Date: Fri, 06 Oct 2017 10:14:13 +0300 Message-ID: <8360bswxx6.fsf@gnu.org> References: <87r2unyh79.fsf@gmail.com> <83zi95x4of.fsf@gnu.org> <87376xxhcg.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507274123 8598 195.159.176.226 (6 Oct 2017 07:15:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 07:15:23 +0000 (UTC) Cc: 28658@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 06 09:15:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0Mqk-0000ly-JD for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Oct 2017 09:15:10 +0200 Original-Received: from localhost ([::1]:43323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Mqr-0002MW-Qy for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Oct 2017 03:15:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Mqh-0002Hi-Lj for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 03:15:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0Mqc-00073J-NU for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 03:15:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0Mqc-00072j-KT for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 03:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0Mqc-0003kM-EI for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 03:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Oct 2017 07:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28658 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28658-submit@debbugs.gnu.org id=B28658.150727407514347 (code B ref 28658); Fri, 06 Oct 2017 07:15:02 +0000 Original-Received: (at 28658) by debbugs.gnu.org; 6 Oct 2017 07:14:35 +0000 Original-Received: from localhost ([127.0.0.1]:52077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0MqA-0003jL-RL for submit@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0Mq9-0003j4-59 for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0Mpz-0006Ym-0X for 28658@debbugs.gnu.org; Fri, 06 Oct 2017 03:14:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Mpy-0006Ye-T8; Fri, 06 Oct 2017 03:14:22 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0Mpy-00059Y-Bj; Fri, 06 Oct 2017 03:14:22 -0400 In-reply-to: <87376xxhcg.fsf@gmail.com> (message from Alex on Thu, 05 Oct 2017 18:14:39 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137997 Archived-At: > From: Alex > Cc: 28658@debbugs.gnu.org > Date: Thu, 05 Oct 2017 18:14:39 -0600 > > Eli Zaretskii writes: > > > >> @@ -290,12 +292,14 @@ xterm-mouse-event > >> (xterm-mouse--set-click-count event click-count))) > >> ((not last-time) nil) > >> ((and (> double-click-time (* 1000 (- this-time last-time))) > >> + (eq x last-x) > >> + (eq y last-y) > > > > IMO, 'eq' is not right here: this test should obey the value of > > double-click-fuzz, whose units on TTY frames are 1/8 of a character. > > I don't understand how to use double-click-fuzz in TTY frames. You said > that TTY frames can't discern screen position differences of less than a > character, so then why are the units 1/8th of a character? I don't know why the units are 1/8th of a character, perhaps so that a user could set the same value for both GUI and TTY frames. In any case, dividing the value of double-click-fuzz by 8 before comparing with coordinate differences is easy enough, no? > Is there a way to get the mouse coordinate position in 1/8ths of a > character to use double-click-fuzz? I don't think you can get sub-character resolution, but that doesn't mean double-click-fuzz cannot be obeyed: a user could set the value to 16, in which case a 2-character distance should still be okay. With the default value of 3, the second click should indeed be on the same character, so it will be equivalent to your eq test, but that's only the default.