diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-07 15:28:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-07 15:28:09 +0100 |
commit | c3fc75db023f2acd0b82b7eebffd7ed89e8001ed (patch) | |
tree | ccd13a21ec12f4b20124bedb7397896471ec8e9a /src/vim9type.c | |
parent | 00385114dbd6a3d59516baa02e1ea86a1e7ee70e (diff) | |
download | vim-git-c3fc75db023f2acd0b82b7eebffd7ed89e8001ed.tar.gz |
patch 8.2.2480: Vim9: some errors for white space do not show contextv8.2.2480
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
Diffstat (limited to 'src/vim9type.c')
-rw-r--r-- | src/vim9type.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vim9type.c b/src/vim9type.c index 1374cee1b..dbe7db92c 100644 --- a/src/vim9type.c +++ b/src/vim9type.c @@ -788,7 +788,8 @@ parse_type(char_u **arg, garray_T *type_gap, int give_error) if (!VIM_ISWHITE(*p)) { if (give_error) - semsg(_(e_white_space_required_after_str), ","); + semsg(_(e_white_space_required_after_str_str), + ",", p - 1); return NULL; } } @@ -815,7 +816,8 @@ parse_type(char_u **arg, garray_T *type_gap, int give_error) // parse return type ++*arg; if (!VIM_ISWHITE(**arg) && give_error) - semsg(_(e_white_space_required_after_str), ":"); + semsg(_(e_white_space_required_after_str_str), + ":", *arg - 1); *arg = skipwhite(*arg); ret_type = parse_type(arg, type_gap, give_error); if (ret_type == NULL) |