diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-21 18:08:56 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-01-21 18:08:56 +0800 |
commit | 6e69a3c3e79fd78b31753343213e68e73b0048c4 (patch) | |
tree | fde79b4be29f81880d5337ff5eb75864836c82da /src/nvim/mbyte.c | |
parent | 8300d337c89dc3ef943694bc1d44f32145a74f0d (diff) | |
download | rneovim-6e69a3c3e79fd78b31753343213e68e73b0048c4.tar.gz rneovim-6e69a3c3e79fd78b31753343213e68e73b0048c4.tar.bz2 rneovim-6e69a3c3e79fd78b31753343213e68e73b0048c4.zip |
refactor: remove CSI unescaping and clean up related names and comments
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 5eb209a6f6..1d1cd5e271 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -2089,8 +2089,7 @@ const char *mb_unescape(const char **const pp) size_t buf_idx = 0; uint8_t *str = (uint8_t *)(*pp); - // Must translate K_SPECIAL KS_SPECIAL KE_FILLER to K_SPECIAL and CSI - // KS_EXTRA KE_CSI to CSI. + // Must translate K_SPECIAL KS_SPECIAL KE_FILLER to K_SPECIAL. // Maximum length of a utf-8 character is 4 bytes. for (size_t str_idx = 0; str[str_idx] != NUL && buf_idx < 4; str_idx++) { if (str[str_idx] == K_SPECIAL @@ -2098,11 +2097,6 @@ const char *mb_unescape(const char **const pp) && str[str_idx + 2] == KE_FILLER) { buf[buf_idx++] = (char)K_SPECIAL; str_idx += 2; - } else if ((str[str_idx] == K_SPECIAL) - && str[str_idx + 1] == KS_EXTRA - && str[str_idx + 2] == KE_CSI) { - buf[buf_idx++] = (char)CSI; - str_idx += 2; } else if (str[str_idx] == K_SPECIAL) { break; // A special key can't be a multibyte char. } else { |