summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-04-22 09:05:57 +0300
committerEli Zaretskii <eliz@gnu.org>2022-04-22 09:05:57 +0300
commitd5728f129fb2c20e9c0ff44651a538a40f3088af (patch)
tree6e22e8cde0f33b3cd8559eff18ac7d2ae774b119
parentbf771e31bc93d5d48e0661b875cc785c792d214f (diff)
downloademacs-d5728f129fb2c20e9c0ff44651a538a40f3088af.tar.gz
emacs-d5728f129fb2c20e9c0ff44651a538a40f3088af.tar.bz2
emacs-d5728f129fb2c20e9c0ff44651a538a40f3088af.zip
Another fix for non-ASCII 'overlay-arrow-string'
* src/xdisp.c (get_overlay_arrow_glyph_row): Fix yet another place that assumed each character is a single byte.
-rw-r--r--src/xdisp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 42c3e81e5c3..6963935666b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -774,7 +774,7 @@ static bool message_buf_print;
static bool message_cleared_p;
/* A scratch glyph row with contents used for generating truncation
- glyphs. Also used in direct_output_for_insert. */
+ glyphs and overlay-arrow glyphs. */
#define MAX_SCRATCH_GLYPHS 100
static struct glyph_row scratch_glyph_row;
@@ -21653,7 +21653,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
struct buffer *buffer = XBUFFER (w->contents);
struct buffer *old = current_buffer;
const unsigned char *arrow_string = SDATA (overlay_arrow_string);
- ptrdiff_t arrow_len = SCHARS (overlay_arrow_string), char_num = 0;
+ ptrdiff_t arrow_len = SBYTES (overlay_arrow_string), char_num = 0;
const unsigned char *arrow_end = arrow_string + arrow_len;
const unsigned char *p;
struct it it;