Mercurial > vim
diff src/vim9execute.c @ 19281:9fcdeaa18bd1 v8.2.0199
patch 8.2.0199: Vim9 script commands not sufficiently tested
Commit: https://github.com/vim/vim/commit/0f18b6d17baa7d33f209a3184726a162c2bb7ed8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 2 17:22:27 2020 +0100
patch 8.2.0199: Vim9 script commands not sufficiently tested
Problem: Vim9 script commands not sufficiently tested.
Solution: Add more tests. Fix script-local function use.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Feb 2020 17:30:03 +0100 |
parents | f63f3b423ad3 |
children | 9dc843109c97 |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1502,21 +1502,26 @@ failed: ex_disassemble(exarg_T *eap) { #ifdef DISASSEMBLE - ufunc_T *ufunc = find_func(eap->arg, NULL); + char_u *fname; + ufunc_T *ufunc; dfunc_T *dfunc; isn_T *instr; int current; int line_idx = 0; int prev_current = 0; + fname = trans_function_name(&eap->arg, FALSE, + TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL); + ufunc = find_func(fname, NULL); + vim_free(fname); if (ufunc == NULL) { - semsg("Cannot find function %s", eap->arg); + semsg("E1061: Cannot find function %s", eap->arg); return; } if (ufunc->uf_dfunc_idx < 0) { - semsg("Function %s is not compiled", eap->arg); + semsg("E1062: Function %s is not compiled", eap->arg); return; } if (ufunc->uf_name_exp != NULL)