From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Date: Sat, 30 Sep 2017 21:56:58 -0600 Message-ID: <87zi9bwmet.fsf@gmail.com> References: <87r2unyh79.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1506830292 32261 195.159.176.226 (1 Oct 2017 03:58:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 1 Oct 2017 03:58:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 28658@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 01 05:58:08 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 1dyVOJ-0007zr-P1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Oct 2017 05:58:08 +0200 Original-Received: from localhost ([::1]:41105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyVOR-0005Ub-1i for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 23:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyVOI-0005Tt-Nz for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 23:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyVOF-0004fe-2A for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 23:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyVOE-0004fM-SO for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 23:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dyVOE-00075b-Kv for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 23:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Oct 2017 03:58: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.150683023027148 (code B ref 28658); Sun, 01 Oct 2017 03:58:02 +0000 Original-Received: (at 28658) by debbugs.gnu.org; 1 Oct 2017 03:57:10 +0000 Original-Received: from localhost ([127.0.0.1]:41654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyVNO-00073m-02 for submit@debbugs.gnu.org; Sat, 30 Sep 2017 23:57:10 -0400 Original-Received: from mail-it0-f41.google.com ([209.85.214.41]:55629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyVNL-00073I-Ub for 28658@debbugs.gnu.org; Sat, 30 Sep 2017 23:57:08 -0400 Original-Received: by mail-it0-f41.google.com with SMTP id 4so3856626itv.4 for <28658@debbugs.gnu.org>; Sat, 30 Sep 2017 20:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=SUvrNw8KO6PpgVvHaF5ItUHwYl82ErsqpWqjTYC4F80=; b=K0lC+Zpt9xyH7plobhKbd/Zon0JnTBUVhiKbg3pF+QY3Wu+f8It53SYfa3Sz358jc3 bSSqJ/rbPo5s9dUS+nAZcdkrk081gOoP+deKCJk05VqTsCCG9HXD6vOpcFRbQzG4pcLb XIAH1X5+5WVmC1BCj06c8smMjYyt6PTReN3YdF4eG8gMDriQORyA7jFKTH3iBxxz4s6R OvB3nPhaTXPokt82+thLJiSUR8Q4+97gOyQWa5oPPTKvf+iHaMLHLd910H6OGCJ0vAhD Ru92ItDdpJwkNC693ayDzqNFJrs4js21Ynq+SRtHWDSOznpVPZ+sE7+yuaKvRKf022K9 p9rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=SUvrNw8KO6PpgVvHaF5ItUHwYl82ErsqpWqjTYC4F80=; b=ij74H4fbSHcTHvEueIpubU8x5Xf05csGxQ/z84hzyKDwFrWvhMSIhPhZguh/F9A9vE 5SLC21HVkfubyOju6SZvIok6//C/yCKcR1+6WJ38++pi28EhOkUrd4SYq5jmgdno0wBg v19qgRmhLCUfgHE+1mLuw6RF4hjneonFzP5nma/cKFfsCEUQZQ6OTXB54huTaSkc4+iw SaelGUD1m9Qkg73vE47hlL1NBVvjUs7qroUPJeLMdcN+vI13WCvfhIzZwsrixqo61l9P lwVNgkFy/AjmYVgk2FVPiKZrCzv/GKFTveRcIO3VlqA0iPRsPP3P+/fGclf44ChjftMr EKaw== X-Gm-Message-State: AMCzsaUBCw7xS9xesZI25mvy0p+qJHo3MTfm/y6anOA364uHXTkF8kim GXjprIhzMm9oJkzt4qSomDZnxw== X-Google-Smtp-Source: AOwi7QA/M++v/4QMuNl9q3qpeLwiwoXumx7/f7gdzM5azvKo4ZycGKrJco7ULXVzZK1ICioLj5N4ug== X-Received: by 10.36.10.142 with SMTP id 136mr13253604itw.92.1506830221940; Sat, 30 Sep 2017 20:57:01 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id g196sm3054855ita.4.2017.09.30.20.57.00 for <28658@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 20:57:00 -0700 (PDT) In-Reply-To: <87r2unyh79.fsf@gmail.com> (Alex's message of "Sat, 30 Sep 2017 16:06:34 -0600") 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:137729 Archived-At: --=-=-= Content-Type: text/plain I also found another issue, but it doesn't really warrant a new report. If you double click right after entering xterm-mouse-mode, then you'll see: xterm-mouse-translate-1: Wrong type argument: number-or-marker-p, nil This is because click-count isn't set to 1 when `xterm-mouse-last-click' is first set in `xterm-mouse-event'. Here's a patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Set-xterm-click-count-to-1-even-with-no-last-click.patch Content-Description: init click >From 6bc82587b2c7554e93b603d0c5835f287673a7c5 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sat, 30 Sep 2017 21:38:10 -0600 Subject: [PATCH] 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. (Bug#28658) --- lisp/xt-mouse.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index dc202e78f6..cbbeec82fa 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -290,8 +290,8 @@ xterm-mouse-event (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 (* 1000 (- this-time last-time))) (eq x last-x) (eq y last-y) (equal last-name (replace-match "" t t name))) -- 2.14.2 --=-=-= Content-Type: text/plain P.S. Why is the error prefixed by `xterm-mouse-translate-1' instead of `xterm-mouse-event'? --=-=-=--