comparison 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
comparison
equal deleted inserted replaced
19280:669bd4306d67 19281:9fcdeaa18bd1
1500 */ 1500 */
1501 void 1501 void
1502 ex_disassemble(exarg_T *eap) 1502 ex_disassemble(exarg_T *eap)
1503 { 1503 {
1504 #ifdef DISASSEMBLE 1504 #ifdef DISASSEMBLE
1505 ufunc_T *ufunc = find_func(eap->arg, NULL); 1505 char_u *fname;
1506 ufunc_T *ufunc;
1506 dfunc_T *dfunc; 1507 dfunc_T *dfunc;
1507 isn_T *instr; 1508 isn_T *instr;
1508 int current; 1509 int current;
1509 int line_idx = 0; 1510 int line_idx = 0;
1510 int prev_current = 0; 1511 int prev_current = 0;
1511 1512
1513 fname = trans_function_name(&eap->arg, FALSE,
1514 TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL);
1515 ufunc = find_func(fname, NULL);
1516 vim_free(fname);
1512 if (ufunc == NULL) 1517 if (ufunc == NULL)
1513 { 1518 {
1514 semsg("Cannot find function %s", eap->arg); 1519 semsg("E1061: Cannot find function %s", eap->arg);
1515 return; 1520 return;
1516 } 1521 }
1517 if (ufunc->uf_dfunc_idx < 0) 1522 if (ufunc->uf_dfunc_idx < 0)
1518 { 1523 {
1519 semsg("Function %s is not compiled", eap->arg); 1524 semsg("E1062: Function %s is not compiled", eap->arg);
1520 return; 1525 return;
1521 } 1526 }
1522 if (ufunc->uf_name_exp != NULL) 1527 if (ufunc->uf_name_exp != NULL)
1523 msg((char *)ufunc->uf_name_exp); 1528 msg((char *)ufunc->uf_name_exp);
1524 else 1529 else