mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
Use my_wcwidth()+my_wcswidth() instead of system’s wcwdith()+wcswidth()
But not that these functions map to the system’s versions if foot was configured with ‘-Dsystem-wcwidth’.
This commit is contained in:
parent
c758949145
commit
97ade97d38
4 changed files with 15 additions and 11 deletions
3
ime.c
3
ime.c
|
|
@ -15,6 +15,7 @@
|
|||
#include "util.h"
|
||||
#include "wayland.h"
|
||||
#include "xmalloc.h"
|
||||
#include "my-wcwidth.h"
|
||||
|
||||
static void
|
||||
enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
||||
|
|
@ -178,7 +179,7 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
|
|||
size_t widths[wchars + 1];
|
||||
|
||||
for (size_t i = 0; i < wchars; i++) {
|
||||
int width = max(wcwidth(seat->ime.preedit.text[i]), 1);
|
||||
int width = max(my_wcwidth(seat->ime.preedit.text[i]), 1);
|
||||
widths[i] = width;
|
||||
cell_count += width;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue