diff src/cmdexpand.c @ 25682:17ba70005a2e v8.2.3377

patch 8.2.3377: Vim9: :disass completion does not understand "s:" Commit: https://github.com/vim/vim/commit/47016f57724d3970c54f4ca1f392dff39d3fecae Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 26 16:39:58 2021 +0200 patch 8.2.3377: Vim9: :disass completion does not understand "s:" Problem: Vim9: :disass completion does not understand "s:". Solution: Expand "s:" to a pattern. (closes https://github.com/vim/vim/issues/8780)
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 Aug 2021 16:45:04 +0200
parents 4d3c68196d05
children ba9d587f0b29
line wrap: on
line diff
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -2073,7 +2073,9 @@ ExpandFromContext(
 
     // When expanding a function name starting with s:, match the <SNR>nr_
     // prefix.
-    if (xp->xp_context == EXPAND_USER_FUNC && STRNCMP(pat, "^s:", 3) == 0)
+    if ((xp->xp_context == EXPAND_USER_FUNC
+				       || xp->xp_context == EXPAND_DISASSEMBLE)
+	    && STRNCMP(pat, "^s:", 3) == 0)
     {
 	int len = (int)STRLEN(pat) + 20;