mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-12 04:27:51 -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
csi.c
3
csi.c
|
|
@ -24,6 +24,7 @@
|
|||
#include "vt.h"
|
||||
#include "xmalloc.h"
|
||||
#include "xsnprintf.h"
|
||||
#include "my-wcwidth.h"
|
||||
|
||||
#define UNHANDLED() LOG_DBG("unhandled: %s", csi_as_string(term, final, -1))
|
||||
#define UNHANDLED_SGR(idx) LOG_DBG("unhandled: %s", csi_as_string(term, 'm', idx))
|
||||
|
|
@ -742,7 +743,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
int count = vt_param_get(term, 0, 1);
|
||||
LOG_DBG("REP: '%lc' %d times", (wint_t)term->vt.last_printed, count);
|
||||
|
||||
const int width = wcwidth(term->vt.last_printed);
|
||||
const int width = my_wcwidth(term->vt.last_printed);
|
||||
if (width > 0) {
|
||||
for (int i = 0; i < count; i++)
|
||||
term_print(term, term->vt.last_printed, width);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue