From: Eli Zaretskii <eliz@gnu.org>
To: git@vladimir.panteleev.md, Jared Finder <jared@finder.org>
Cc: 61022@debbugs.gnu.org
Subject: bug#61022: 28.2.50; Mouse tracking of high coordinates not working in rxvt-unicode
Date: Mon, 23 Jan 2023 15:15:45 +0200 [thread overview]
Message-ID: <83y1ptie7y.fsf@gnu.org> (raw)
In-Reply-To: <87sfg2nyy5.fsf@home.thecybershadow.net> (git@vladimir.panteleev.md)
> From: git@vladimir.panteleev.md
> Date: Sun, 22 Jan 2023 19:36:50 +0000
>
> For some reason, xt-mouse with xterm-mouse-utf-8 on isn't working for me
> under rxvt-unicode. I assume it worked at some point, but it's not
> working now.
>
> I investigated it a little and it looks like the (read-char nil nil 0.1)
> call is no longer reading an entire UTF-8 character unless the
> inherit-input-method argument is non-nil. I don't know why that is.
> But, in any case, this patch fixes it for me:
>
> ----------------------------------------------------------------------
> >From 32e4b5ab67006ed08c853396686315ed373691be Mon Sep 17 00:00:00 2001
> From: Vladimir Panteleev <git@cy.md>
> Date: Sun, 22 Jan 2023 18:54:05 +0000
> Subject: [PATCH] Fix xterm mouse tracking of high coordinates with
> xterm-mouse-utf-8
>
> read-char now needs inherit-input-method to be non-nil for it to read
> a whole UTF-8 code point, even with set-keyboard-coding-system.
>
> * lisp/xt-mouse.el (xterm-mouse--read-coordinate): Call read-char with
> inherit-input-method as t.
> ---
> lisp/xt-mouse.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
> index adfa480bc0f..2b6b448305e 100644
> --- a/lisp/xt-mouse.el
> +++ b/lisp/xt-mouse.el
> @@ -160,7 +160,7 @@ xterm-mouse--read-coordinate
> 'no-conversion))
> ;; Wait only a little; we assume that the entire escape sequence
> ;; has already been sent when this function is called.
> - (read-char nil nil 0.1))
> + (read-char nil t 0.1))
> (set-keyboard-coding-system previous-keyboard-coding-system))))
>
> ;; In default mode, each numeric parameter of XTerm's mouse report is
> --
> 2.38.1
> ----------------------------------------------------------------------
>
> Reproducer:
>
> - Run urxvt
> - In it, run emacs -Q -nw
> - M-: (require 'xt-mouse)
> - M-: (setq xterm-mouse-utf-8 t)
> - M-x xterm-mouse-mode
> - Make sure the window is wider than 96 lines or columns
> - Move the mouse around past the 96th line or column
>
> Hope this helps.
Jared, any comments?
Thanks.
next prev parent reply other threads:[~2023-01-23 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 19:36 bug#61022: 28.2.50; Mouse tracking of high coordinates not working in rxvt-unicode git
2023-01-23 13:15 ` Eli Zaretskii [this message]
2023-01-24 6:56 ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-24 12:24 ` Eli Zaretskii
2023-01-25 5:09 ` Jared Finder via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26 8:57 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y1ptie7y.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61022@debbugs.gnu.org \
--cc=git@vladimir.panteleev.md \
--cc=jared@finder.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.