[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Final" version of tty child frames
From: |
Eli Zaretskii |
Subject: |
Re: "Final" version of tty child frames |
Date: |
Mon, 13 Jan 2025 15:13:19 +0200 |
> Date: Sun, 12 Jan 2025 22:32:03 -0800
> From: Jared Finder <jared@finder.org>
> Cc: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>,
> emacs-devel@gnu.org
>
> On 2025-01-04 19:48, Gerd Möllmann wrote:
> > Jared Finder <jared@finder.org> writes:
> >
> >> Unfortunately, the redisplay code in Emacs is super hard for me to
> >> understand and I can't figure out where or how the cursor gets
> >> positioned. If someone could give me some pointers here, I'd love to
> >> investigate further.
> >
> > I think you want to take a look at dispnew.c, functions
> > combine_updates_for_frame, and there at this part
> >
> > /* If a child is displayed, and the cursor is displayed in another
> > frame, the child might lay above the cursor, so that it appears to
> > "shine through" the child. Avoid that because it's confusing. */
> > if (topmost_child)
> > terminal_cursor_magic (root, topmost_child);
> > flush_terminal (root
>
> Thanks for the pointer. There's definitely something strange going on
> here, like Emacs is writing the entire row and not restoring the cursor
> to the previous location.
>
> The good news is that this seems to affect both xterm as well as Linux
> terminals, so hopefully someone more familiar with this code can debug.
> A simple repro case (with posframe installed):
>
> 1. Evaluate (posframe-show " *test*" :string (concat "A\nB\n*long
> text*\nC\nD"))
> 2. Now try to place the cursor on some text after one of the single
> letter lines while still being in the root frame. (I've been using M-x
> info since the directory node has lots of nice text)
>
> When I do this, my cursor always appears at the end of the line so long
> as it is after the posframe. When the cursor is before the posframe,
> the cursor is displayed fine.
>
> I confirmed via debugging code that tty_cursor_to and tty_raw_cursor_to
> were being called with the expected values, so the cursor must be moving
> after that.
Cursor on TTY frames can move because we write to the terminal (I'm
sure you knew that, but just to be sure).
Another idea is to record the stuff sent to the terminal, by using the
open-termscript command. Then you can examine that file to find out
what Emacs actually sent to the screen.
- Re: "Final" version of tty child frames, Jared Finder, 2025/01/04
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/04
- Re: "Final" version of tty child frames, Jared Finder, 2025/01/13
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/13
- Re: "Final" version of tty child frames,
Eli Zaretskii <=
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/14
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/14
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/14
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/14
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/14
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/14
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/14
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/14
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/15
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/15