summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 94035c3..e953fda 100644
--- a/main.c
+++ b/main.c
@@ -5,6 +5,8 @@
/* TODO:
*
+ * - read ~user/.pronouns and put next to name
+ * - add keybind to view info about a user, like .plan, .project etc
* - maybe remove ncurses dependency
* - consider setting up a proper log file for log_warn / log_err stuff
*
@@ -193,8 +195,8 @@ typedef struct {
int fast_utf8_width(Str s) {
int n = 0;
for (int i = 0; i < s.n; i++) {
- if (stdc_leading_ones(i) > 0) {
- i += stdc_leading_ones(i) - 1;
+ if (s.s[i] & 0x80) {
+ i += stdc_leading_ones((unsigned)i) - 1;
}
n++;
}