Mercurial > vim
comparison src/message.c @ 21859:3e5d0832a2e7 v8.2.1479
patch 8.2.1479: Vim9: error for list index uses wrong line number
Commit: https://github.com/vim/vim/commit/1d634542cf5ebcd1d5d83bd124b3e1d5e7c96c58
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 18 13:41:50 2020 +0200
patch 8.2.1479: Vim9: error for list index uses wrong line number
Problem: Vim9: error for list index uses wrong line number.
Solution: Set source line number. (closes https://github.com/vim/vim/issues/6724) Add a way to assert the
line number of the error with assert_fails().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 18 Aug 2020 13:45:04 +0200 |
parents | 7449921216bc |
children | b6d36f0b4f03 |
comparison
equal
deleted
inserted
replaced
21858:10d05fa7d7a9 | 21859:3e5d0832a2e7 |
---|---|
653 ++did_emsg; | 653 ++did_emsg; |
654 return TRUE; | 654 return TRUE; |
655 } | 655 } |
656 | 656 |
657 if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL) | 657 if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL) |
658 { | |
658 emsg_assert_fails_msg = vim_strsave(s); | 659 emsg_assert_fails_msg = vim_strsave(s); |
660 emsg_assert_fails_lnum = SOURCING_LNUM; | |
661 } | |
659 | 662 |
660 // set "v:errmsg", also when using ":silent! cmd" | 663 // set "v:errmsg", also when using ":silent! cmd" |
661 set_vim_var_string(VV_ERRMSG, s, -1); | 664 set_vim_var_string(VV_ERRMSG, s, -1); |
662 #endif | 665 #endif |
663 | 666 |