From 3ca0343fb99b7f7412fca73be6f94df252b6f0a3 Mon Sep 17 00:00:00 2001 From: erw7 Date: Thu, 23 May 2019 01:47:56 +0900 Subject: 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. https://github.com/vim/vim/commit/6b810d92a9cd9378ab46ea0db07079cb789f9faa --- src/nvim/option.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index fa994e24c3..100902897a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -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; } -- cgit