]> granicus.if.org Git - vim/commitdiff
patch 8.2.3383: Vim9: completion for :disassemble adds parenthesis v8.2.3383
authornaohiro ono <obcat@icloud.com>
Sat, 28 Aug 2021 13:56:06 +0000 (15:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 28 Aug 2021 13:56:06 +0000 (15:56 +0200)
Problem:    Vim9: completion for :disassemble adds parenthesis.
Solution:   Don't add parenthesis. (Naohiro Ono, closes #8802)

src/testdir/test_cmdline.vim
src/userfunc.c
src/version.c

index 0a71b1118bb0c4f8a048cd7b200fda079509a71a..341a0f11345fc5de886e6745198fa767a0eb28de 100644 (file)
@@ -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')
index 86a2bec4eb5ddb893652b7c4c4d62d308517ffcd..4a2b05e0ce2e7af847c8f39314a8def6f325b90a 100644 (file)
@@ -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)
index 77935e5e6c66fe51bcec7befc351bc94a6679692..a9c5b4cdfc5803d793a556b9fc37b6673bd7f5c0 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3383,
 /**/
     3382,
 /**/