From 9aecf79c45da5593e4d8c0de1b2d212edc4765ce Mon Sep 17 00:00:00 2001 From: naohiro ono Date: Sat, 28 Aug 2021 15:56:06 +0200 Subject: [PATCH] patch 8.2.3383: Vim9: completion for :disassemble adds parenthesis Problem: Vim9: completion for :disassemble adds parenthesis. Solution: Don't add parenthesis. (Naohiro Ono, closes #8802) --- src/testdir/test_cmdline.vim | 4 +++- src/userfunc.c | 3 ++- src/version.c | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 0a71b1118..341a0f113 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -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\\\"\", 'xt') call assert_equal("\"disas profile Test_cmdline_complete_various", @:) + call feedkeys(":disas Test_cmdline_complete_var\\\"\", 'xt') + call assert_equal("\"disas Test_cmdline_complete_various", @:) call feedkeys(":disas s:WeirdF\\\"\", 'xt') - call assert_match('"disas \d\+_WeirdFunc()', @:) + call assert_match('"disas \d\+_WeirdFunc', @:) " completion for the :match command call feedkeys(":match Search /pat/\\\"\", 'xt') diff --git a/src/userfunc.c b/src/userfunc.c index 86a2bec4e..4a2b05e0c 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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) diff --git a/src/version.c b/src/version.c index 77935e5e6..a9c5b4cdf 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 */ +/**/ + 3383, /**/ 3382, /**/ -- 2.40.0