forked from aniani/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)
This commit is contained in:
committed by
Bram Moolenaar
parent
f1e8876fa2
commit
dfe04dbff5
@@ -2262,7 +2262,8 @@ ExpandGeneric(
|
|||||||
{
|
{
|
||||||
if (xp->xp_context == EXPAND_EXPRESSION
|
if (xp->xp_context == EXPAND_EXPRESSION
|
||||||
|| xp->xp_context == EXPAND_FUNCTIONS
|
|| 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.
|
// <SNR> functions should be sorted to the end.
|
||||||
qsort((void *)*file, (size_t)*num_file, sizeof(char_u *),
|
qsort((void *)*file, (size_t)*num_file, sizeof(char_u *),
|
||||||
sort_func_compare);
|
sort_func_compare);
|
||||||
|
@@ -854,6 +854,11 @@ func Test_cmdline_complete_various()
|
|||||||
call feedkeys(":disas s:WeirdF\<C-A>\<C-B>\"\<CR>", 'xt')
|
call feedkeys(":disas s:WeirdF\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||||
call assert_match('"disas <SNR>\d\+_WeirdFunc', @:)
|
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
|
" completion for the :match command
|
||||||
call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
|
call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||||
call assert_equal("\"match Search /pat/\<C-A>", @:)
|
call assert_equal("\"match Search /pat/\<C-A>", @:)
|
||||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3431,
|
||||||
/**/
|
/**/
|
||||||
3430,
|
3430,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user