aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2016-07-02 16:56:36 +0300
committerEli Zaretskii2016-07-02 16:56:36 +0300
commitda2512f24c5772476671202bf6106f63983e22e4 (patch)
tree21fd6c389a5ce38f521642afee117f263cd1272d /src
parent3a1e3b41a545ffc438b2e5c69982ff82e64b747c (diff)
downloademacs-da2512f24c5772476671202bf6106f63983e22e4.tar.gz
emacs-da2512f24c5772476671202bf6106f63983e22e4.zip
Fix cursor positioning on TTY frames after stretch glyph
* src/term.c (append_glyph, append_composite_glyph) (append_glyphless_glyph): Set the avoid_cursor_p and multibyte_p members of the produced 'struct glyph'. Fixes cursor positioning on the first character after a stretch glyph produced from line-prefix, wrap-prefix, etc. on TTY frames.
Diffstat (limited to 'src')
-rw-r--r--src/term.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index 7e63a0cf634..81908b370a5 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1496,6 +1496,8 @@ append_glyph (struct it *it)
1496 glyph->pixel_width = 1; 1496 glyph->pixel_width = 1;
1497 glyph->u.ch = it->char_to_display; 1497 glyph->u.ch = it->char_to_display;
1498 glyph->face_id = it->face_id; 1498 glyph->face_id = it->face_id;
1499 glyph->avoid_cursor_p = it->avoid_cursor_p;
1500 glyph->multibyte_p = it->multibyte_p;
1499 glyph->padding_p = i > 0; 1501 glyph->padding_p = i > 0;
1500 glyph->charpos = CHARPOS (it->position); 1502 glyph->charpos = CHARPOS (it->position);
1501 glyph->object = it->object; 1503 glyph->object = it->object;
@@ -1692,8 +1694,10 @@ append_composite_glyph (struct it *it)
1692 glyph->slice.cmp.to = it->cmp_it.to - 1; 1694 glyph->slice.cmp.to = it->cmp_it.to - 1;
1693 } 1695 }
1694 1696
1697 glyph->avoid_cursor_p = it->avoid_cursor_p;
1698 glyph->multibyte_p = it->multibyte_p;
1695 glyph->face_id = it->face_id; 1699 glyph->face_id = it->face_id;
1696 glyph->padding_p = 0; 1700 glyph->padding_p = false;
1697 glyph->charpos = CHARPOS (it->position); 1701 glyph->charpos = CHARPOS (it->position);
1698 glyph->object = it->object; 1702 glyph->object = it->object;
1699 if (it->bidi_p) 1703 if (it->bidi_p)
@@ -1776,8 +1780,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
1776 return; 1780 return;
1777 glyph->type = CHAR_GLYPH; 1781 glyph->type = CHAR_GLYPH;
1778 glyph->pixel_width = 1; 1782 glyph->pixel_width = 1;
1783 glyph->avoid_cursor_p = it->avoid_cursor_p;
1784 glyph->multibyte_p = it->multibyte_p;
1779 glyph->face_id = face_id; 1785 glyph->face_id = face_id;
1780 glyph->padding_p = 0; 1786 glyph->padding_p = false;
1781 glyph->charpos = CHARPOS (it->position); 1787 glyph->charpos = CHARPOS (it->position);
1782 glyph->object = it->object; 1788 glyph->object = it->object;
1783 if (it->bidi_p) 1789 if (it->bidi_p)