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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user