diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-08-30 16:43:31 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-27 07:26:42 +0800 |
commit | f4ddbaeb9e3dd68f8d6b90e805246a24b7960019 (patch) | |
tree | fa61eb5e4e6ff51c78af9413d13e4013256757f1 /test | |
parent | d9f4c1db23bff997ec2f568b378c2666fa580ad7 (diff) | |
download | rneovim-f4ddbaeb9e3dd68f8d6b90e805246a24b7960019.tar.gz rneovim-f4ddbaeb9e3dd68f8d6b90e805246a24b7960019.tar.bz2 rneovim-f4ddbaeb9e3dd68f8d6b90e805246a24b7960019.zip |
vim-patch:9.1.0654: completion does not respect completeslash with fuzzy
Problem: completion does not respect completeslash with fuzzy
(egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
option value (glepnir)
fixes: vim/vim#15392
closes: vim/vim#15418
https://github.com/vim/vim/commit/b9de1a057f9a0b6de6f64a9c1b2078c7069cdd7d
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_ins_complete.vim | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index 0b1a1bed47..3accb1f286 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -2966,6 +2966,38 @@ func Test_complete_fuzzy_match() unlet g:abbr endfunc +func Test_complete_fuzzy_with_completeslash() + CheckMSWindows + + call writefile([''], 'fobar', 'D') + let orig_shellslash = &shellslash + set cpt& + new + set completeopt+=fuzzy + set noshellslash + + " Test with completeslash unset + set completeslash= + call setline(1, ['.\fob']) + call feedkeys("A\<C-X>\<C-F>\<Esc>0", 'tx!') + call assert_equal('.\fobar', getline('.')) + + " Test with completeslash=backslash + set completeslash=backslash + call feedkeys("S.\\fob\<C-X>\<C-F>\<Esc>0", 'tx!') + call assert_equal('.\fobar', getline('.')) + + " Test with completeslash=slash + set completeslash=slash + call feedkeys("S.\\fob\<C-X>\<C-F>\<Esc>0", 'tx!') + call assert_equal('./fobar', getline('.')) + + " Reset and clean up + let &shellslash = orig_shellslash + set completeslash= + %bw! +endfunc + " Check that tie breaking is stable for completeopt+=fuzzy (which should " behave the same on different platforms). func Test_complete_fuzzy_match_tie() |