[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Final" version of tty child frames
From: |
martin rudalics |
Subject: |
Re: "Final" version of tty child frames |
Date: |
Tue, 14 Jan 2025 18:33:01 +0100 |
User-agent: |
Mozilla Thunderbird |
>> It's obvious that this _is_ a redisplay optimization trap. But it's a
>> very sophisticated one because the cursor ends up at the correct end of
>> the line. With other words C-f does what C-e does.
>
> I can suggest two things:
These don't help. Meanwhile I suppose that it's not related to
optimizations. What happens is:
I'm in a base (underlying, normal) frame which is partially covered by a
child frame. With 'line-beginning-position' 686 and 'line-end-position'
759 and point at 724 I try to move point to position 725 which is the
first position on that row covered by the child frame.
In set_cursor_from_row at
if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
&& BUFFERP (glyph->object) && glyph->charpos == pt_old)
&& !(bpos_max <= pt_old && pt_old <= bpos_covered))
I have x = 39 which is the expected value 725 - 686 and I would like it.
But that check fails (or better "succeeds") because of
(gdb) p glyph->object
$104 = XIL(0)
(gdb) p glyph->charpos
$105 = -1
(gdb) p pt_old
$106 = 725
(gdb) p bpos_covered
$109 = 0
Then in
else if ((row->truncated_on_right_p && pt_old > bpos_max)
/* Zero-width characters produce no glyphs. */
|| (!empty_line_p
&& (row->reversed_p
? glyph_after > glyphs_end
: glyph_after < glyphs_end)))
{
cursor = glyph_after;
x = -1;
}
I have
(gdb) p !empty_line_p
$111 = 1
(gdb) p glyph_after < glyphs_end
$110 = 1
x is set to -1 and in
if (x < 0)
{
struct glyph *g;
/* Need to compute x that corresponds to GLYPH. */
for (g = row->glyphs[TEXT_AREA], x = row->x; g < glyph; g++)
{
if (g >= row->glyphs[TEXT_AREA] + row->used[TEXT_AREA])
emacs_abort ();
x += g->pixel_width;
}
}
x eventually becomes 73 (759 - 686) which is what I see. What could I
do to make the check at the top succeed?
martin
- 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, 2025/01/13
- 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 <=
- 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