чување 744746bf19437f70d3488b69ea40d6fcf162f599
родитељ 836bc9b21de2b20f2113d3f4b03539288d543e5f
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Fri, 12 Jul 2024 08:03:33 +0200
Update TODO{,.done}
Diffstat:
измењених датотека: 4, додавања: 7(+), брисања: 4(-)
diff --git a/TODO b/TODO
@@ -1,8 +1,6 @@
TODO
====
-[ ] Investigate >2-byte UTF editing (Emoji...)
-
[~] Code optimization (struct coord...)
diff --git a/TODO.done b/TODO.done
@@ -1,6 +1,9 @@
Done or canceled todos
======================
+[x] Investigate >2-byte UTF editing (Emoji...)
+ - setlocale(LC_ALL, "");
+
[x] Add shortcut key which toggles showing line numbers at runtime
(default state still configured in config.h)
diff --git a/draw.c b/draw.c
@@ -950,7 +950,7 @@ u32_draw_string(const int x, const int y, const uint16_t fg, const uint16_t bg,
ww = wcwidth((wchar_t)*ps);
if (ww < 0)
ww = 1;
- if ((ww == 0) && (x + d + p_l + sc > 1))
+ if ((ww == 0) && (x + d + p_l + sc > 0))
tb_extend_cell(x + d + p_l + sc
- 1,
y, *ps);
diff --git a/util.c b/util.c
@@ -7,6 +7,8 @@
#include <stdlib.h>
#include <string.h>
+#define TB_OPT_EGC
+
#include "limit.h"
#include "termbox.h"
#include "util.h"
@@ -19,7 +21,7 @@ u8_string_to_unicode(uint32_t* us, const char* s, const size_t max)
int u8_len = 0;
size_t added = 0;
- while (s && *s && u8_len > 0)
+ while (s && *s)
{
u8_len = tb_utf8_char_to_unicode(&uch, s);
if (added + 1 > max)