|
From: | Jared Finder |
Subject: | bug#41156: margins interfere with xterm-mouse-mode |
Date: | Mon, 14 Jun 2021 20:51:33 -0700 |
User-agent: | Roundcube Webmail/1.3.16 |
On 2021-06-14 5:56 am, Eli Zaretskii wrote:
From: Lars Ingebrigtsen <larsi@gnus.org> Date: Mon, 14 Jun 2021 14:46:22 +0200 Cc: 41156@debbugs.gnu.org, Neil Okamoto <neil.okamoto@gmail.com> martin rudalics <rudalics@gmx.at> writes: > Unless you do > > (set-window-margins (selected-window) 2 0) > > in the window at right.Right, so I guess xterm-mouse-mode needs to define a key binding in themargin area for these mouse commands?Hm... Well, I took a quick peek at xt-mouse.el for the first time in mylife, and that doesn't seem to be how that mode works at all. Is anybody familiar enough with xt-mouse that it's obvious to them what's going wrong in this case?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:
@@ -494,9 +494,12 @@ mouse-drag-line (define-key map [header-line] map) (define-key map [vertical-line] map) ;; ... and some maybe even with a right- or bottom-divider - ;; prefix. + ;; prefix ... (define-key map [right-divider] map) (define-key map [bottom-divider] map) + ;; ... and the margins too. + (define-key map [left-margin] map) + (define-key map [right-margin] map) map) t (lambda () (setq track-mouse old-track-mouse))))))) I'll investigate a bit more later. -- MJF
[Prev in Thread] | Current Thread | [Next in Thread] |