From: naohiro ono Date: Sun, 12 Sep 2021 13:45:10 +0000 (+0200) Subject: patch 8.2.3431: completion for :disas sorts local functions first X-Git-Tag: v8.2.3431 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfe04dbff5863f6c089da8831d7ac2a3421a44b7;p=vim patch 8.2.3431: completion for :disas sorts local functions first Problem: Completion for :disas sorts local functions first. Solution: Sort local functions last, like with :delfunc. (Naohiro Ono, closes #8860) --- diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 6c9295769..c36c21a3d 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -2262,7 +2262,8 @@ ExpandGeneric( { if (xp->xp_context == EXPAND_EXPRESSION || xp->xp_context == EXPAND_FUNCTIONS - || xp->xp_context == EXPAND_USER_FUNC) + || xp->xp_context == EXPAND_USER_FUNC + || xp->xp_context == EXPAND_DISASSEMBLE) // functions should be sorted to the end. qsort((void *)*file, (size_t)*num_file, sizeof(char_u *), sort_func_compare); diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 15ec7d8a3..a0f3ffda4 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -854,6 +854,11 @@ func Test_cmdline_complete_various() call feedkeys(":disas s:WeirdF\\\"\", 'xt') call assert_match('"disas \d\+_WeirdFunc', @:) + call feedkeys(":disas \\\"\", 'xt') + call assert_match('"disas \d\+_', @:) + call feedkeys(":disas debug \\\"\", 'xt') + call assert_match('"disas debug \d\+_', @:) + " completion for the :match command call feedkeys(":match Search /pat/\\\"\", 'xt') call assert_equal("\"match Search /pat/\", @:) diff --git a/src/version.c b/src/version.c index fe111e593..053648a55 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3431, /**/ 3430, /**/