summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-11-23 12:43:49 +0200
committerEli Zaretskii <eliz@gnu.org>2019-11-23 12:43:49 +0200
commit1265e947113efe335139038c89c280db480994af (patch)
treeecee63de161448284213bd5634507d5cb88c61ab
parentc26556bd18f8ca1e891bd1750c9f95b21ea457b0 (diff)
downloademacs-1265e947113efe335139038c89c280db480994af.tar.gz
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)
-rw-r--r--src/xdisp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c5676b3e174..593aaa73ac9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21726,9 +21726,12 @@ extend_face_to_end_of_line (struct it *it)
const int stretch_width = it->last_visible_x - it->current_x;
if (stretch_width > 0)
- append_stretch_glyph (it, Qnil, stretch_width,
- it->ascent + it->descent,
- stretch_ascent);
+ {
+ memset (&it->position, 0, sizeof it->position);
+ append_stretch_glyph (it, Qnil, stretch_width,
+ it->ascent + it->descent,
+ stretch_ascent);
+ }
}
it->char_to_display = saved_char;