summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-02-25 15:24:24 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-25 15:24:24 +0000
commit5ec633b9b0400519db60253cb5846e50394218b4 (patch)
tree0e85ab2bd5fd660ccb24daf164ece05ac57fd081 /src/testdir/test_cmdline.vim
parent4d56b971cbae01cc454eb09713326224993e38ed (diff)
downloadvim-git-5ec633b9b0400519db60253cb5846e50394218b4.tar.gz
patch 8.2.4465: fuzzy completion does not order matches properlyv8.2.4465
Problem: Fuzzy completion does not order matches properly. Solution: Do not use regular expression match. (Yegappan Lakshmanan, closes #9843)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 1ee0d718e..73d39e39e 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -2757,6 +2757,25 @@ func Test_wildoptions_fuzzy()
call feedkeys(":let SVar\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_equal('"let SomeVariable', @:)
+ " Test for sorting the results by the best match
+ %bw!
+ command T123format :
+ command T123goformat :
+ command T123TestFOrmat :
+ command T123fendoff :
+ command T123state :
+ command T123FendingOff :
+ set wildoptions=fuzzy
+ call feedkeys(":T123fo\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"T123format T123TestFOrmat T123FendingOff T123goformat T123fendoff', @:)
+ delcommand T123format
+ delcommand T123goformat
+ delcommand T123TestFOrmat
+ delcommand T123fendoff
+ delcommand T123state
+ delcommand T123FendingOff
+ %bw
+
set wildoptions&
%bw!
endfunc