Re: [PATCH 2/2] Allow check-mark to be changed for CLI

Tom Tromey
2025-06-25T15:43:57Z

Pedro> So maybe all we need is to base the "current" column's width
Pedro> depend on the wcwidth of the character used.

I think to do this we'd need something better than wcwidth. See
appended. Also as Eli points out, the terminal itself can do something
other than whatever wcwidth reports.

Tom

#define _XOPEN_SOURCE
#include <wchar.h>
#include <stdio.h>

#define C L"👉"

int main() {
printf ("width = %d\n", wcswidth (C, wcslen (C)));
printf ("of char = %d\n", wcwidth (C[0]));
return 0;
}

bapiya. gcc -o q q.c
bapiya. ./q
width = -1
of char = -1