summaryrefslogtreecommitdiff
path: root/src/vim9script.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-18 13:14:47 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-18 13:14:47 +0000
commit1836d6157828baddd94e1f2c82488031570e444d (patch)
tree28c1771151da2b8aec00c0106495ce1e157f07ae /src/vim9script.c
parentcbbc48f64b9cfd88720dc94b0578a3726f725178 (diff)
downloadvim-git-1836d6157828baddd94e1f2c82488031570e444d.tar.gz
patch 8.2.4132: Vim9: wrong error message when autoload script can't be foundv8.2.4132
Problem: Vim9: wrong error message when autoload script can't be found. Solution: Correct check for using autoload with wrong name.
Diffstat (limited to 'src/vim9script.c')
-rw-r--r--src/vim9script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vim9script.c b/src/vim9script.c
index 2038c78a0..41df6bfc4 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -411,7 +411,7 @@ handle_import(
int ret = FAIL;
char_u *as_name = NULL;
typval_T tv;
- int sid = -1;
+ int sid = -2;
int res;
long start_lnum = SOURCING_LNUM;
garray_T *import_gap;
@@ -519,7 +519,7 @@ handle_import(
if (res == FAIL || sid <= 0)
{
- semsg(_(is_autoload && sid <= 0
+ semsg(_(is_autoload && sid == -2
? e_autoload_import_cannot_use_absolute_or_relative_path
: e_could_not_import_str), tv.vval.v_string);
goto erret;