Mercurial > vim
comparison src/userfunc.c @ 26883:7f150a4936f2 v8.2.3970
patch 8.2.3970: error messages are spread out
Commit: https://github.com/vim/vim/commit/74409f62790a93daf0965c71da01ff76aa0fa5a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 1 15:58:22 2022 +0000
patch 8.2.3970: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Jan 2022 17:00:04 +0100 |
parents | 06a137af96f8 |
children | d02d40f0261c |
comparison
equal
deleted
inserted
replaced
26882:196f4d7e2a38 | 26883:7f150a4936f2 |
---|---|
1125 int lnum_save = -1; | 1125 int lnum_save = -1; |
1126 linenr_T sourcing_lnum_top = SOURCING_LNUM; | 1126 linenr_T sourcing_lnum_top = SOURCING_LNUM; |
1127 | 1127 |
1128 if (!ends_excmd2(*arg, skipwhite(*arg + 1))) | 1128 if (!ends_excmd2(*arg, skipwhite(*arg + 1))) |
1129 { | 1129 { |
1130 semsg(_(e_trailing_arg), *arg + 1); | 1130 semsg(_(e_trailing_characters_str), *arg + 1); |
1131 return FAIL; | 1131 return FAIL; |
1132 } | 1132 } |
1133 | 1133 |
1134 CLEAR_FIELD(eap); | 1134 CLEAR_FIELD(eap); |
1135 eap.cmdidx = CMD_block; | 1135 eap.cmdidx = CMD_block; |
4146 */ | 4146 */ |
4147 if (!paren) | 4147 if (!paren) |
4148 { | 4148 { |
4149 if (!ends_excmd(*skipwhite(p))) | 4149 if (!ends_excmd(*skipwhite(p))) |
4150 { | 4150 { |
4151 semsg(_(e_trailing_arg), p); | 4151 semsg(_(e_trailing_characters_str), p); |
4152 goto ret_free; | 4152 goto ret_free; |
4153 } | 4153 } |
4154 set_nextcmd(eap, p); | 4154 set_nextcmd(eap, p); |
4155 if (eap->nextcmd != NULL) | 4155 if (eap->nextcmd != NULL) |
4156 *p = NUL; | 4156 *p = NUL; |
4362 && eap->cmdidx != CMD_def) | 4362 && eap->cmdidx != CMD_def) |
4363 && !(VIM_ISWHITE(*whitep) && *p == '#' | 4363 && !(VIM_ISWHITE(*whitep) && *p == '#' |
4364 && (vim9script || eap->cmdidx == CMD_def)) | 4364 && (vim9script || eap->cmdidx == CMD_def)) |
4365 && !eap->skip | 4365 && !eap->skip |
4366 && !did_emsg) | 4366 && !did_emsg) |
4367 semsg(_(e_trailing_arg), p); | 4367 semsg(_(e_trailing_characters_str), p); |
4368 | 4368 |
4369 /* | 4369 /* |
4370 * Read the body of the function, until "}", ":endfunction" or ":enddef" is | 4370 * Read the body of the function, until "}", ":endfunction" or ":enddef" is |
4371 * found. | 4371 * found. |
4372 */ | 4372 */ |
4897 return; | 4897 return; |
4898 } | 4898 } |
4899 if (!ends_excmd(*skipwhite(p))) | 4899 if (!ends_excmd(*skipwhite(p))) |
4900 { | 4900 { |
4901 vim_free(name); | 4901 vim_free(name); |
4902 semsg(_(e_trailing_arg), p); | 4902 semsg(_(e_trailing_characters_str), p); |
4903 return; | 4903 return; |
4904 } | 4904 } |
4905 set_nextcmd(eap, p); | 4905 set_nextcmd(eap, p); |
4906 if (eap->nextcmd != NULL) | 4906 if (eap->nextcmd != NULL) |
4907 *p = NUL; | 4907 *p = NUL; |
5260 if (!ends_excmd2(eap->arg, arg)) | 5260 if (!ends_excmd2(eap->arg, arg)) |
5261 { | 5261 { |
5262 if (!failed && !aborting()) | 5262 if (!failed && !aborting()) |
5263 { | 5263 { |
5264 emsg_severe = TRUE; | 5264 emsg_severe = TRUE; |
5265 semsg(_(e_trailing_arg), arg); | 5265 semsg(_(e_trailing_characters_str), arg); |
5266 } | 5266 } |
5267 } | 5267 } |
5268 else | 5268 else |
5269 set_nextcmd(eap, arg); | 5269 set_nextcmd(eap, arg); |
5270 } | 5270 } |