summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-12-25 17:38:15 +0200
committerEli Zaretskii <eliz@gnu.org>2014-12-25 17:38:15 +0200
commita41d07b329c034ad34e442bef93b6fcaeb556f9f (patch)
tree2c2f674122fcb67314d13a7228eee142291a1200 /src/composite.c
parentb70977ce02432b1ded569215096402e2eee318a3 (diff)
downloademacs-a41d07b329c034ad34e442bef93b6fcaeb556f9f.tar.gz
Fix rendering of composed caharacters on the mode line. (Bug#19435)
src/xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in composition_compute_stop_pos to the number of characters in the string. <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code. src/composite.c (composition_compute_stop_pos): If no composition was found in a string before ENDPOS, and ENDPOS is the string end, no need to back up to a safe point. src/dispextern.h (struct it) <end_charpos>: Improve commentary.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/composite.c b/src/composite.c
index fa882141908..a1282103972 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1036,7 +1036,8 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
}
}
}
- if (charpos == endpos)
+ if (charpos == endpos
+ && !(STRINGP (string) && endpos == SCHARS (string)))
{
/* We couldn't find a composition point before ENDPOS. But,
some character after ENDPOS may be composed with