aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-01-21 18:08:56 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-01-21 18:08:56 +0800
commitff7c3d12750b1cd4baccea0baeafe7e5d5339e94 (patch)
tree80f5d1aaf89e473e549982121ce14dfeaf3092bc /src/nvim/getchar.c
parentc977d8b43cd6ecf7ad756f9b064eadea79fbd604 (diff)
downloadrneovim-ff7c3d12750b1cd4baccea0baeafe7e5d5339e94.tar.gz
rneovim-ff7c3d12750b1cd4baccea0baeafe7e5d5339e94.tar.bz2
rneovim-ff7c3d12750b1cd4baccea0baeafe7e5d5339e94.zip
fix(input): never escape CSI bytes
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 5565e17597..bddf2e21d2 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1010,12 +1010,11 @@ void ins_char_typebuf(int c)
buf[utf_char2bytes(c, buf)] = NUL;
char_u *p = buf;
while (*p) {
- if ((uint8_t)(*p) == CSI || (uint8_t)(*p) == K_SPECIAL) {
- bool is_csi = (uint8_t)(*p) == CSI;
+ if ((uint8_t)(*p) == K_SPECIAL) {
memmove(p + 3, p + 1, STRLEN(p + 1) + 1);
*p++ = K_SPECIAL;
- *p++ = is_csi ? KS_EXTRA : KS_SPECIAL;
- *p++ = is_csi ? KE_CSI : KE_FILLER;
+ *p++ = KS_SPECIAL;
+ *p++ = KE_FILLER;
} else {
p++;
}