diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-01-21 18:04:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 18:04:40 +0100 |
commit | e07a4b97f6552674f6038d15c0767bbfea082bf2 (patch) | |
tree | 479eed2cc5ce0afea43e239848e934b9a6df2c11 /src/nvim/mbyte.c | |
parent | be22cc1264ba27ed46f8ef3123c532d721478607 (diff) | |
parent | 6e69a3c3e79fd78b31753343213e68e73b0048c4 (diff) | |
download | rneovim-e07a4b97f6552674f6038d15c0767bbfea082bf2.tar.gz rneovim-e07a4b97f6552674f6038d15c0767bbfea082bf2.tar.bz2 rneovim-e07a4b97f6552674f6038d15c0767bbfea082bf2.zip |
Merge pull request #16936 from zeertzjq/no-escape-csi
input: never escape CSI bytes 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 { |