From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41156: margins interfere with xterm-mouse-mode Date: Tue, 15 Jun 2021 14:19:01 +0300 Message-ID: <831r935qai.fsf@gnu.org> References: <2E809CFD-2C79-4529-BB68-4510A0F7C4D9@gmail.com> <87o8ca3qyp.fsf_-_@gnus.org> <87czso1un5.fsf@gnus.org> <831r947gfy.fsf@gnu.org> <0726d33d5a1f5463cd7d3d60217104be@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 41156@debbugs.gnu.org, neil.okamoto@gmail.com To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 15 13:20:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lt774-0009L1-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Jun 2021 13:20:10 +0200 Original-Received: from localhost ([::1]:42488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lt773-0002aE-Ra for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Jun 2021 07:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lt76w-0002Zq-5Q for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2021 07:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lt76v-0006nL-S0 for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2021 07:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lt76v-0008U7-Lt for bug-gnu-emacs@gnu.org; Tue, 15 Jun 2021 07:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jun 2021 11:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 41156-submit@debbugs.gnu.org id=B41156.162375595132547 (code B ref 41156); Tue, 15 Jun 2021 11:20:01 +0000 Original-Received: (at 41156) by debbugs.gnu.org; 15 Jun 2021 11:19:11 +0000 Original-Received: from localhost ([127.0.0.1]:48516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lt767-0008Ss-3m for submit@debbugs.gnu.org; Tue, 15 Jun 2021 07:19:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lt763-0008Sc-Kv for 41156@debbugs.gnu.org; Tue, 15 Jun 2021 07:19:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49380) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lt75w-00067M-HR; Tue, 15 Jun 2021 07:19:01 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3983 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lt75w-0002Lx-5t; Tue, 15 Jun 2021 07:19:00 -0400 In-Reply-To: <0726d33d5a1f5463cd7d3d60217104be@finder.org> (message from Jared Finder on Mon, 14 Jun 2021 22:29:36 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208532 Archived-At: > Date: Mon, 14 Jun 2021 22:29:36 -0700 > From: Jared Finder > Cc: Lars Ingebrigtsen , rudalics@gmx.at, > 41156@debbugs.gnu.org, neil.okamoto@gmail.com > > >> Jared, can you help us out here, please? > > > > xterm-mouse-mode is running fine, it is correctly generating > > mouse-motion events with proper X,Y coordinates. > > > > The actual drag keybinding is handled in mouse-drag-line in mouse.el. > > The following patch mostly works for me, though I see issues when > > dragging to the left and the left buffer has a margin of width greater > > than 1. I think there's some incorrect logic in how the temporarily > > bound move function is converting calculating positions: > > > > And I'm fairly certain this is the proper fix. If a window is live, > then the AREA-OR-POS made by posn-at-x-y should never be nil, I believe: Thanks, Jared. Lars, feel free to install, unless you have comments.