diff options
| author | Albert Cervin <albert@acervin.com> | 2024-05-22 00:00:29 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-09-12 20:17:56 +0200 |
| commit | 405da5f84b072ea97b69359454899f45d92d24b6 (patch) | |
| tree | 20525b4bc44a5d8cbab4d62abe8413e174731db6 /src/dged/utf8.c | |
| parent | 4ab7e453e26afc6e9f4938c65f89463fbba9e267 (diff) | |
| download | dged-405da5f84b072ea97b69359454899f45d92d24b6.tar.gz dged-405da5f84b072ea97b69359454899f45d92d24b6.tar.xz dged-405da5f84b072ea97b69359454899f45d92d24b6.zip | |
WIP LSP client
This contains the start of an LSP client.
Nothing (except starting the LSP server) works
at the moment and the feature is disabled by default.
Diffstat (limited to 'src/dged/utf8.c')
| -rw-r--r-- | src/dged/utf8.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dged/utf8.c b/src/dged/utf8.c index ede4fb1..01dcdbd 100644 --- a/src/dged/utf8.c +++ b/src/dged/utf8.c @@ -112,7 +112,6 @@ uint32_t utf8_nchars(uint8_t *bytes, uint32_t nbytes) { uint32_t utf8_nbytes(uint8_t *bytes, uint32_t nbytes, uint32_t nchars) { uint32_t bi = 0; uint32_t chars = 0; - uint32_t expected = 0; while (chars < nchars && bi < nbytes) { struct codepoint codepoint = next_utf8_codepoint(bytes + bi, nbytes - bi); @@ -127,7 +126,7 @@ uint32_t utf8_nbytes(uint8_t *bytes, uint32_t nbytes, uint32_t nchars) { uint32_t unicode_visual_char_width(const struct codepoint *codepoint) { if (codepoint->nbytes > 0) { // TODO: use unicode classification instead - size_t w = wcwidth(codepoint->codepoint); + int w = wcwidth(codepoint->codepoint); return w >= 0 ? w : 2; } else { return 0; |
