Mercurial > vim
diff src/vim9compile.c @ 25374:7124992f26ef v8.2.3224
patch 8.2.3224: cannot call script-local function after :vim9cmd
Commit: https://github.com/vim/vim/commit/678b207fb111840fec1f0dc43910613ba106b90d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 26 21:10:11 2021 +0200
patch 8.2.3224: cannot call script-local function after :vim9cmd
Problem: Cannot call script-local function after :vim9cmd. (Christian J.
Robinson)
Solution: Skip over "<SNR>123".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 26 Jul 2021 21:15:06 +0200 |
parents | d52504ef26ed |
children | 9c749ad22565 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -3562,14 +3562,18 @@ to_name_end(char_u *arg, int use_namespa /* * Like to_name_end() but also skip over a list or dict constant. + * Also accept "<SNR>123_Func". * This intentionally does not handle line continuation. */ char_u * to_name_const_end(char_u *arg) { - char_u *p = to_name_end(arg, TRUE); + char_u *p = arg; typval_T rettv; + if (STRNCMP(p, "<SNR>", 5) == 0) + p = skipdigits(p + 5); + p = to_name_end(p, TRUE); if (p == arg && *arg == '[') {