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/ops.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/ops.c')
-rw-r--r-- | src/nvim/ops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 1a12cb636a..2bc92ce295 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -922,8 +922,8 @@ int do_record(int c) // The recorded text contents. p = get_recorded(); if (p != NULL) { - // Remove escaping for CSI and K_SPECIAL in multi-byte chars. - vim_unescape_csi(p); + // Remove escaping for K_SPECIAL in multi-byte chars. + vim_unescape_ks(p); (void)tv_dict_add_str(dict, S_LEN("regcontents"), (const char *)p); } @@ -933,7 +933,7 @@ int do_record(int c) buf[1] = NUL; (void)tv_dict_add_str(dict, S_LEN("regname"), buf); - // Get the recorded key hits. K_SPECIAL and CSI will be escaped, this + // Get the recorded key hits. K_SPECIAL will be escaped, this // needs to be removed again to put it in a register. exec_reg then // adds the escaping back later. apply_autocmds(EVENT_RECORDINGLEAVE, NULL, NULL, false, curbuf); @@ -1099,7 +1099,7 @@ int do_execreg(int regname, int colon, int addcr, int silent) return FAIL; } } - escaped = vim_strsave_escape_csi(reg->y_array[i]); + escaped = vim_strsave_escape_ks(reg->y_array[i]); retval = ins_typebuf(escaped, remap, 0, true, silent); xfree(escaped); if (retval == FAIL) { @@ -1141,7 +1141,7 @@ static void put_reedit_in_typebuf(int silent) /// Insert register contents "s" into the typeahead buffer, so that it will be /// executed again. /// -/// @param esc when true then it is to be taken literally: Escape CSI +/// @param esc when true then it is to be taken literally: Escape K_SPECIAL /// characters and no remapping. /// @param colon add ':' before the line static int put_in_typebuf(char_u *s, bool esc, bool colon, int silent) @@ -1156,7 +1156,7 @@ static int put_in_typebuf(char_u *s, bool esc, bool colon, int silent) char_u *p; if (esc) { - p = vim_strsave_escape_csi(s); + p = vim_strsave_escape_ks(s); } else { p = s; } |