aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-05-23 01:47:56 +0900
committererw7 <erw7.github@gmail.com>2020-02-12 15:16:32 +0900
commit3ca0343fb99b7f7412fca73be6f94df252b6f0a3 (patch)
treea9d41540a97c3f6239ad8034998fd78b52bd7a19 /src
parent4813ad48cd12a03ca50c01ac1b20518bf4df57f2 (diff)
downloadrneovim-3ca0343fb99b7f7412fca73be6f94df252b6f0a3.tar.gz
rneovim-3ca0343fb99b7f7412fca73be6f94df252b6f0a3.tar.bz2
rneovim-3ca0343fb99b7f7412fca73be6f94df252b6f0a3.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c9
1 files changed, 6 insertions, 3 deletions
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;
}