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 6c92957..c36c21a 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -2262,7 +2262,8 @@
{
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)
// <SNR> 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 15ec7d8..a0f3ffd 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -854,6 +854,11 @@
call feedkeys(":disas s:WeirdF\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_match('"disas <SNR>\d\+_WeirdFunc', @:)
+ call feedkeys(":disas \<S-Tab>\<C-B>\"\<CR>", 'xt')
+ call assert_match('"disas <SNR>\d\+_', @:)
+ call feedkeys(":disas debug \<S-Tab>\<C-B>\"\<CR>", 'xt')
+ call assert_match('"disas debug <SNR>\d\+_', @:)
+
" completion for the :match command
call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"match Search /pat/\<C-A>", @:)
diff --git a/src/version.c b/src/version.c
index fe111e5..053648a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3431,
+/**/
3430,
/**/
3429,