Mercurial > vim
diff src/userfunc.c @ 21747:7e1316c6d0eb v8.2.1423
patch 8.2.1423: Vim9: find global function when looking for script-local
Commit: https://github.com/vim/vim/commit/035d6e91bd83574cab5a913c5c3a924d9011696b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 11 22:30:42 2020 +0200
patch 8.2.1423: Vim9: find global function when looking for script-local
Problem: Vim9: find global function when looking for script-local.
Solution: Don't strip prefix if name starts with "s:". (closes https://github.com/vim/vim/issues/6688)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Aug 2020 22:45:05 +0200 |
parents | a849c984b485 |
children | f84625b961a8 |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -2132,8 +2132,8 @@ call_func( char_u *p = untrans_function_name(rfname); // If using Vim9 script try not local to the script. - // TODO: should not do this if the name started with "s:". - if (p != NULL) + // Don't do this if the name starts with "s:". + if (p != NULL && (funcname[0] != 's' || funcname[1] != ':')) fp = find_func(p, is_global, NULL); }