1
0
forked from aniani/vim

patch 8.1.0032: BS in prompt buffer starts new line

Problem:    BS in prompt buffer starts new line.
Solution:   Do not allows BS over the prompt.  Make term_sendkeys() handle
            special keys. Add a test.
This commit is contained in:
Bram Moolenaar
2018-06-04 17:28:44 +02:00
parent c8523e2e6c
commit 6b810d92a9
4 changed files with 68 additions and 9 deletions

View File

@@ -5094,8 +5094,19 @@ f_term_sendkeys(typval_T *argvars, typval_T *rettv)
while (*msg != NUL)
{
send_keys_to_term(term, PTR2CHAR(msg), FALSE);
msg += MB_CPTR2LEN(msg);
int c;
if (*msg == K_SPECIAL && msg[1] != NUL && msg[2] != NUL)
{
c = TO_SPECIAL(msg[1], msg[2]);
msg += 3;
}
else
{
c = PTR2CHAR(msg);
msg += MB_CPTR2LEN(msg);
}
send_keys_to_term(term, c, FALSE);
}
}