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.
6b810d92a9
This commit is contained in:
erw7
2019-05-23 01:47:56 +09:00
parent 4813ad48cd
commit 3ca0343fb9
2 changed files with 80 additions and 9 deletions

View File

@@ -7092,10 +7092,13 @@ static int check_opt_wim(void)
*/
bool can_bs(int what)
{
if (what == BS_START && bt_prompt(curbuf)) {
return false;
}
switch (*p_bs) {
case '2': return true;
case '1': return what != BS_START;
case '0': return false;
case '2': return true;
case '1': return what != BS_START;
case '0': return false;
}
return vim_strchr(p_bs, what) != NULL;
}