Mirror of the Vim source from https://github.com/vim/vim
リビジョン | 7b8e2bea0ec519c60f380ae23ab2a0c4457bd3f2 (tree) |
---|---|
日時 | 2022-01-18 22:15:06 |
作者 | Bram Moolenaar <Bram@vim....> |
コミッター | Bram Moolenaar |
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
@@ -1433,9 +1433,21 @@ | ||
1433 | 1433 | |
1434 | 1434 | lines =<< trim END |
1435 | 1435 | vim9script |
1436 | + import autoload './doesNotExist.vim' | |
1437 | + END | |
1438 | + CheckScriptFailure(lines, 'E1264:') | |
1439 | + | |
1440 | + lines =<< trim END | |
1441 | + vim9script | |
1442 | + import autoload '/dir/doesNotExist.vim' | |
1443 | + END | |
1444 | + CheckScriptFailure(lines, 'E1264:') | |
1445 | + | |
1446 | + lines =<< trim END | |
1447 | + vim9script | |
1436 | 1448 | import autoload 'doesNotExist.vim' |
1437 | 1449 | END |
1438 | - CheckScriptFailure(lines, 'E1264:') | |
1450 | + CheckScriptFailure(lines, 'E1053: Could not import "doesNotExist.vim"') | |
1439 | 1451 | enddef |
1440 | 1452 | |
1441 | 1453 | " test disassembling an auto-loaded function starting with "debug" |
@@ -751,6 +751,8 @@ | ||
751 | 751 | static int included_patches[] = |
752 | 752 | { /* Add new patch number below this line */ |
753 | 753 | /**/ |
754 | + 4132, | |
755 | +/**/ | |
754 | 756 | 4131, |
755 | 757 | /**/ |
756 | 758 | 4130, |
@@ -411,7 +411,7 @@ | ||
411 | 411 | int ret = FAIL; |
412 | 412 | char_u *as_name = NULL; |
413 | 413 | typval_T tv; |
414 | - int sid = -1; | |
414 | + int sid = -2; | |
415 | 415 | int res; |
416 | 416 | long start_lnum = SOURCING_LNUM; |
417 | 417 | garray_T *import_gap; |
@@ -519,7 +519,7 @@ | ||
519 | 519 | |
520 | 520 | if (res == FAIL || sid <= 0) |
521 | 521 | { |
522 | - semsg(_(is_autoload && sid <= 0 | |
522 | + semsg(_(is_autoload && sid == -2 | |
523 | 523 | ? e_autoload_import_cannot_use_absolute_or_relative_path |
524 | 524 | : e_could_not_import_str), tv.vval.v_string); |
525 | 525 | goto erret; |