summaryrefslogtreecommitdiff
path: root/src/testdir/test_popup.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-02-09 17:37:03 +0100
committerBram Moolenaar <Bram@vim.org>2017-02-09 17:37:03 +0100
commit190b04cdd936f4696c22466b7f077f9371d96580 (patch)
tree449a487f34d05e886a1515599c600694e659b9b0 /src/testdir/test_popup.vim
parenta9f8ffb6345f5b246944c73b9861fcc53eaa5228 (diff)
downloadvim-190b04cdd936f4696c22466b7f077f9371d96580.zip
patch 8.0.0319: insert mode completion does not respect 'backspace'
Problem: Insert mode completion does not respect "start" in 'backspace'. Solution: Check whether backspace can go before where insert started. (Hirohito Higashi)
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r--src/testdir/test_popup.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index efbb9185d..f4ce064d7 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -511,4 +511,24 @@ func Test_completion_clear_candidate_list()
bw!
endfunc
+func Test_completion_respect_bs_option()
+ new
+ let li = ["aaa", "aaa12345", "aaaabcdef", "aaaABC"]
+
+ set bs=indent,eol
+ call setline(1, li)
+ 1
+ call feedkeys("A\<C-X>\<C-N>\<C-P>\<BS>\<BS>\<BS>\<Esc>", "tx")
+ call assert_equal('aaa', getline(1))
+
+ %d
+ set bs=indent,eol,start
+ call setline(1, li)
+ 1
+ call feedkeys("A\<C-X>\<C-N>\<C-P>\<BS>\<BS>\<BS>\<Esc>", "tx")
+ call assert_equal('', getline(1))
+
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab