[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: |
Wed, 15 Jan 2025 21:43:07 +0200 |
> Date: Wed, 15 Jan 2025 18:01:52 +0100
> Cc: gerd.moellmann@gmail.com, jared@finder.org, emacs-devel@gnu.org
> From: martin rudalics <rudalics@gmx.at>
>
> >> Back to redisplay optimization.
> >
> > Does this mean you've solved the problem in set_cursor_from_row?
> > Because that problem, if it's real, has nothing to do with redisplay
> > optimizations.
>
> Turning the table: When I insert a character in the row at hand the
> problem doesn't occur. When I just move point it does occur. Why?
Sheer luck?
> First special case the approach to tty frames. On a tty there is only
> one cursor in the selected window so we don't have to care about the
> cursor in any window but the selected one. Right?
No, I don't think so. set_cursor_from_row is needed not only to know
where to draw the cursor, it is also needed to make sure that the
cursor is visible.
> In set_cursor_from_row in step 1 advance over the border glyphs of a
> child frame, over any glyph whose object is a buffer but not the buffer
> of the selected window and maybe over any glyph whose object is nil (I
> don't know what kind of such glyphs might exist - maybe the
> truncation/continuation line glyphs). Whatever it is, we have to bypass
> the
>
> /* glyph was not inserted by redisplay for internal purposes */
> && !NILP (glyph->object))
>
> check.
>
> If the glyph at point is not an object of the selected window's buffer,
> the cursor is not shown (IIUC there is a separate routine for detecting
> that but we maybe could do it here right away). Otherwise show the
> cursor as usual.
>
> If step 1 fails, we could try a similar approach in step 2 (stop when a
> glyph's object is at PT) but I didn't look into that yet.
This is fragile. E.g., the same buffer could be displayed both in the
parent and the child frames. And there could be other complications,
for example, the glyphs inserted by redisplay could appear where you
don't expect them, because frames overlap.
I suggested earlier to look at glyph->frame, and stop when you see a
frame that is different from XFRAME (w->frame), where w is the window
pointer passed to set_cursor_from_row. Isn't that a simpler and more
reliable way to know when you bump into a glyph from the wrong frame,
which means you've stepped into a different frame?
Then the next question is what do we want set_cursor_from_row to
return in that case.
- Re: "Final" version of tty child frames, (continued)
- 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
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/15
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/15
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/15
- 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
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/15
- Re: "Final" version of tty child frames,
Eli Zaretskii <=
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/15
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/16
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/16
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/16
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/16
- Re: "Final" version of tty child frames, Eli Zaretskii, 2025/01/16
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/16
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/16
- Re: "Final" version of tty child frames, martin rudalics, 2025/01/16
- Re: "Final" version of tty child frames, Gerd Möllmann, 2025/01/16