Mercurial > vim
comparison src/eval.c @ 28461:938c174b8088 v8.2.4755
patch 8.2.4755: cannot use <SID>FuncRef in completion spec
Commit: https://github.com/vim/vim/commit/12eb2eb4d78828513d91e04b0e69550ed37a5932
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 15 22:57:09 2022 +0100
patch 8.2.4755: cannot use <SID>FuncRef in completion spec
Problem: Cannot use <SID>FuncRef in completion spec.
Solution: Dereference a function name in another way. (closes https://github.com/vim/vim/issues/10197)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Apr 2022 00:00:03 +0200 |
parents | 4dcccb2673fe |
children | a35d54d01ade |
comparison
equal
deleted
inserted
replaced
28460:5bd8735b98a4 | 28461:938c174b8088 |
---|---|
637 typval_T ref; | 637 typval_T ref; |
638 char_u *name = *arg; | 638 char_u *name = *arg; |
639 | 639 |
640 ref.v_type = VAR_UNKNOWN; | 640 ref.v_type = VAR_UNKNOWN; |
641 if (eval7(arg, &ref, evalarg, FALSE) == FAIL) | 641 if (eval7(arg, &ref, evalarg, FALSE) == FAIL) |
642 return NULL; | 642 { |
643 dictitem_T *v; | |
644 | |
645 // If <SID>VarName was used it would not be found, try another way. | |
646 v = find_var_also_in_script(name, NULL, FALSE); | |
647 if (v == NULL) | |
648 return NULL; | |
649 copy_tv(&v->di_tv, &ref); | |
650 } | |
643 if (*skipwhite(*arg) != NUL) | 651 if (*skipwhite(*arg) != NUL) |
644 { | 652 { |
645 if (verbose) | 653 if (verbose) |
646 semsg(_(e_trailing_characters_str), *arg); | 654 semsg(_(e_trailing_characters_str), *arg); |
647 name = NULL; | 655 name = NULL; |