Mercurial > vim
comparison src/vim9script.c @ 27207:7b8e2bea0ec5 v8.2.4132
patch 8.2.4132: Vim9: wrong error message when autoload script can't be found
Commit: https://github.com/vim/vim/commit/1836d6157828baddd94e1f2c82488031570e444d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 18 13:14:47 2022 +0000
patch 8.2.4132: Vim9: wrong error message when autoload script can't be found
Problem: Vim9: wrong error message when autoload script can't be found.
Solution: Correct check for using autoload with wrong name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 18 Jan 2022 14:15:06 +0100 |
parents | 5b267700e6ab |
children | 61d6a31a5874 |
comparison
equal
deleted
inserted
replaced
27206:db4583616f61 | 27207:7b8e2bea0ec5 |
---|---|
409 int getnext; | 409 int getnext; |
410 char_u *expr_end; | 410 char_u *expr_end; |
411 int ret = FAIL; | 411 int ret = FAIL; |
412 char_u *as_name = NULL; | 412 char_u *as_name = NULL; |
413 typval_T tv; | 413 typval_T tv; |
414 int sid = -1; | 414 int sid = -2; |
415 int res; | 415 int res; |
416 long start_lnum = SOURCING_LNUM; | 416 long start_lnum = SOURCING_LNUM; |
417 garray_T *import_gap; | 417 garray_T *import_gap; |
418 int i; | 418 int i; |
419 | 419 |
517 vim_free(from_name); | 517 vim_free(from_name); |
518 } | 518 } |
519 | 519 |
520 if (res == FAIL || sid <= 0) | 520 if (res == FAIL || sid <= 0) |
521 { | 521 { |
522 semsg(_(is_autoload && sid <= 0 | 522 semsg(_(is_autoload && sid == -2 |
523 ? e_autoload_import_cannot_use_absolute_or_relative_path | 523 ? e_autoload_import_cannot_use_absolute_or_relative_path |
524 : e_could_not_import_str), tv.vval.v_string); | 524 : e_could_not_import_str), tv.vval.v_string); |
525 goto erret; | 525 goto erret; |
526 } | 526 } |
527 | 527 |