summaryrefslogtreecommitdiff
path: root/src/dged/utf8.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-11-26 23:08:06 +0100
committerAlbert Cervin <albert@acervin.com>2024-01-15 10:39:56 +0100
commit64d6816a36567274551dd4f067fe4d05b1445cc0 (patch)
tree50f8dc895d363ab391d30226f665870d8ce263b5 /src/dged/utf8.c
parentc87888f10dfb54590c5aae8311b7aff887193d9a (diff)
downloaddged-64d6816a36567274551dd4f067fe4d05b1445cc0.tar.gz
dged-64d6816a36567274551dd4f067fe4d05b1445cc0.tar.xz
dged-64d6816a36567274551dd4f067fe4d05b1445cc0.zip
Completion rework
- Add support for building with clang Also fix some annoying bugs: - Visual column was wrong when using tabs - Add shift-tab for inserting an actual tab - Fix minibuffer sometimes having dot above it
Diffstat (limited to 'src/dged/utf8.c')
-rw-r--r--src/dged/utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dged/utf8.c b/src/dged/utf8.c
index 30344be..b71a7e1 100644
--- a/src/dged/utf8.c
+++ b/src/dged/utf8.c
@@ -71,7 +71,7 @@ uint32_t utf8_visual_char_width(uint8_t *bytes, uint32_t len) {
if (utf8_byte_is_unicode_start(*bytes)) {
wchar_t wc;
size_t nbytes = 0;
- if (nbytes = mbrtowc(&wc, (char *)bytes, len, NULL) > 0) {
+ if ((nbytes = mbrtowc(&wc, (char *)bytes, len, NULL)) > 0) {
return wcwidth(wc);
} else {
return 0;