Skip to content

Commit 1265e94

Browse files
committed
Fix cursor display at EOL before extended face
* src/xdisp.c (extend_face_to_end_of_line): Make sure the character position of the stretch glyph inserted to extend the face is zero, as various other parts of the display code rely on that. (Bug#38330)
1 parent c26556b commit 1265e94

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/xdisp.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21726,9 +21726,12 @@ extend_face_to_end_of_line (struct it *it)
2172621726
const int stretch_width = it->last_visible_x - it->current_x;
2172721727

2172821728
if (stretch_width > 0)
21729-
append_stretch_glyph (it, Qnil, stretch_width,
21730-
it->ascent + it->descent,
21731-
stretch_ascent);
21729+
{
21730+
memset (&it->position, 0, sizeof it->position);
21731+
append_stretch_glyph (it, Qnil, stretch_width,
21732+
it->ascent + it->descent,
21733+
stretch_ascent);
21734+
}
2173221735
}
2173321736

2173421737
it->char_to_display = saved_char;

0 commit comments

Comments
 (0)