Support libunistring versions before 1.2
Alpine 3.20 Success Details
Arch Linux AUR Success Details
OpenBSD 7.5 Success Details

This commit is contained in:
Přemysl Eric Janouch 2024-09-02 23:25:08 +02:00
parent 9d0acddf9a
commit eec0706333
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 2 deletions

View File

@ -5911,9 +5911,9 @@ x11_render_editor (struct widget *self)
// TODO: Make this scroll around the caret, and fade like labels.
size_t len;
ucs4_t *buf = xcalloc (e->len + 1, sizeof *buf);
*u32_pcpy (buf, e->line, e->point) = 0;
u32_cpy (buf, e->line, e->point);
char *a = (char *) u32_to_u8 (buf, u32_strlen (buf) + 1, NULL, &len);
*u32_pcpy (buf, e->line + e->point, e->len - e->point) = 0;
u32_cpy (buf, e->line + e->point, e->len - e->point + 1);
char *b = (char *) u32_to_u8 (buf, u32_strlen (buf) + 1, NULL, &len);
free (buf);