comparison src/eval.c @ 28119:57ea74314c1b v8.2.4584

patch 8.2.4584: error for using autoload function in custom completion Commit: https://github.com/vim/vim/commit/da6d42c35a68610af872551b03077047258a7551 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 17 11:46:55 2022 +0000 patch 8.2.4584: error for using autoload function in custom completion Problem: Error for using autoload function in custom completion. Solution: Do not check for errors when using an autoload function. (closes #9962)
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Mar 2022 13:00:07 +0100
parents 62a57c60edc1
children dd2ed5345f20
comparison
equal deleted inserted replaced
28118:9f0aed0d75e2 28119:57ea74314c1b
703 funcexe.fe_lastline = curwin->w_cursor.lnum; 703 funcexe.fe_lastline = curwin->w_cursor.lnum;
704 funcexe.fe_evaluate = TRUE; 704 funcexe.fe_evaluate = TRUE;
705 705
706 // The name might be "import.Func" or "Funcref". We don't know, we need to 706 // The name might be "import.Func" or "Funcref". We don't know, we need to
707 // ignore errors for an undefined name. But we do want errors when an 707 // ignore errors for an undefined name. But we do want errors when an
708 // autoload script has errors. Guess that when there is a dot or '#' in 708 // autoload script has errors. Guess that when there is a dot in the name
709 // the name showing errors is the right choice. 709 // showing errors is the right choice.
710 ignore_errors = vim_strchr(func, '.') == NULL 710 ignore_errors = vim_strchr(func, '.') == NULL;
711 && vim_strchr(func, AUTOLOAD_CHAR) == NULL;
712 arg = func; 711 arg = func;
713 if (ignore_errors) 712 if (ignore_errors)
714 ++emsg_off; 713 ++emsg_off;
715 name = deref_function_name(&arg, &tofree, &EVALARG_EVALUATE, FALSE); 714 name = deref_function_name(&arg, &tofree, &EVALARG_EVALUATE, FALSE);
716 if (ignore_errors) 715 if (ignore_errors)