diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-01-01 22:35:43 +0000 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-07 17:20:50 +0000 |
| commit | 712c7e5d5fe8fbd93e47b8064a24ff9346720402 (patch) | |
| tree | 4641ad9cb4dca6cc9a334d03e6451b804fa668f7 /src/nvim/testdir | |
| parent | 30deb14f397e576aedfa54600ed7408b3e03459d (diff) | |
| download | rneovim-712c7e5d5fe8fbd93e47b8064a24ff9346720402.tar.gz rneovim-712c7e5d5fe8fbd93e47b8064a24ff9346720402.tar.bz2 rneovim-712c7e5d5fe8fbd93e47b8064a24ff9346720402.zip | |
vim-patch:8.2.1921: fuzzy matching does not recognize path separators
Problem: Fuzzy matching does not recognize path separators.
Solution: Add a bonus for slash and backslash. (Yegappan Lakshmanan,
closes vim/vim#7225)
https://github.com/vim/vim/commit/dcdd42a8ccb9bafd857735d694b074269f337333
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_matchfuzzy.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_matchfuzzy.vim b/src/nvim/testdir/test_matchfuzzy.vim index 28367b878d..d67d9bd893 100644 --- a/src/nvim/testdir/test_matchfuzzy.vim +++ b/src/nvim/testdir/test_matchfuzzy.vim @@ -45,6 +45,8 @@ func Test_matchfuzzy() call assert_equal(['.vim/vimrc', '.vim/vimrc_colors', '.vim/v_i_m_r_c'], ['.vim/vimrc', '.vim/vimrc_colors', '.vim/v_i_m_r_c']->matchfuzzy('vimrc')) " gap penalty call assert_equal(['xxayybxxxx', 'xxayyybxxx', 'xxayyyybxx'], ['xxayyyybxx', 'xxayyybxxx', 'xxayybxxxx']->matchfuzzy('ab')) + " path separator vs word separator + call assert_equal(['color/setup.vim', 'color\\setup.vim', 'color setup.vim', 'color_setup.vim', 'colorsetup.vim'], matchfuzzy(['colorsetup.vim', 'color setup.vim', 'color/setup.vim', 'color_setup.vim', 'color\\setup.vim'], 'setup.vim')) " match multiple words (separated by space) call assert_equal(['foo bar baz'], ['foo bar baz', 'foo', 'foo bar', 'baz bar']->matchfuzzy('baz foo')) |