aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-08 20:29:23 +0800
committerGitHub <noreply@github.com>2023-04-08 20:29:23 +0800
commit747264320c6d8c022fdcb3c9b22f81c9e472e571 (patch)
tree454446f2376d7e1eb90bc424e8be172e16d9153b /src
parente6d3f87dfd71dde94aebce600fd11cb954af1ba9 (diff)
downloadrneovim-747264320c6d8c022fdcb3c9b22f81c9e472e571.tar.gz
rneovim-747264320c6d8c022fdcb3c9b22f81c9e472e571.tar.bz2
rneovim-747264320c6d8c022fdcb3c9b22f81c9e472e571.zip
refactor(mappings)!: remove #n as a notation for a function key (#17318)
This notation is hardly used and makes the behavior of the from_part argument of nvim_replace_termcodes confusing.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/keycodes.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/nvim/keycodes.c b/src/nvim/keycodes.c
index 3dcfb6376d..abf31ae344 100644
--- a/src/nvim/keycodes.c
+++ b/src/nvim/keycodes.c
@@ -905,19 +905,6 @@ char *replace_termcodes(const char *const from, const size_t from_len, char **co
src = from;
- // Check for #n at start only: function key n
- if ((flags & REPTERM_FROM_PART) && from_len > 1 && src[0] == '#'
- && ascii_isdigit(src[1])) { // function key
- result[dlen++] = (char)K_SPECIAL;
- result[dlen++] = 'k';
- if (src[1] == '0') {
- result[dlen++] = ';'; // #0 is F10 is "k;"
- } else {
- result[dlen++] = src[1]; // #3 is F3 is "k3"
- }
- src += 2;
- }
-
// Copy each byte from *from to result[dlen]
while (src <= end) {
if (!allocated && dlen + 64 > buf_len) {