Skip to content

Commit

Permalink
patch 8.2.3383: Vim9: completion for :disassemble adds parenthesis
Browse files Browse the repository at this point in the history
Problem:    Vim9: completion for :disassemble adds parenthesis.
Solution:   Don't add parenthesis. (Naohiro Ono, closes #8802)
  • Loading branch information
obcat authored and brammool committed Aug 28, 2021
1 parent c8103b4 commit 9aecf79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/testdir/test_cmdline.vim
Expand Up @@ -841,9 +841,11 @@ func Test_cmdline_complete_various()
call assert_equal("\"disas debug Test_cmdline_complete_various", @:)
call feedkeys(":disas profile Test_cmdline_complete_var\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"disas profile Test_cmdline_complete_various", @:)
call feedkeys(":disas Test_cmdline_complete_var\<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"disas Test_cmdline_complete_various", @:)

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', @:)

" completion for the :match command
call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
Expand Down
3 changes: 2 additions & 1 deletion src/userfunc.c
Expand Up @@ -4625,7 +4625,8 @@ get_user_func_name(expand_T *xp, int idx)
return fp->uf_name; // prevents overflow

cat_func_name(IObuff, fp);
if (xp->xp_context != EXPAND_USER_FUNC)
if (xp->xp_context != EXPAND_USER_FUNC
&& xp->xp_context != EXPAND_DISASSEMBLE)
{
STRCAT(IObuff, "(");
if (!has_varargs(fp) && fp->uf_args.ga_len == 0)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3383,
/**/
3382,
/**/
Expand Down

0 comments on commit 9aecf79

Please sign in to comment.