[PATCH 2/2] Allow check-mark to be changed for CLI
Tom Tromey
tom@tromey.com
Wed Jun 25 15:43:13 GMT 2025
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
More information about the Gdb-patches
mailing list