Mercurial > vim
comparison src/match.c @ 26958:d92e0d85923f v8.2.4008
patch 8.2.4008: error messages are spread out
Commit: https://github.com/vim/vim/commit/677658ae49de31fe2e5b1fa6d93fdfab85a4362e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 5 16:09:06 2022 +0000
patch 8.2.4008: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Jan 2022 17:15:05 +0100 |
parents | d02d40f0261c |
children | 85866e069c24 |
comparison
equal
deleted
inserted
replaced
26957:e5b81e2bed22 | 26958:d92e0d85923f |
---|---|
43 | 43 |
44 if (*grp == NUL || (pat != NULL && *pat == NUL)) | 44 if (*grp == NUL || (pat != NULL && *pat == NUL)) |
45 return -1; | 45 return -1; |
46 if (id < -1 || id == 0) | 46 if (id < -1 || id == 0) |
47 { | 47 { |
48 semsg(_("E799: Invalid ID: %d (must be greater than or equal to 1)"), | 48 semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id); |
49 id); | |
50 return -1; | 49 return -1; |
51 } | 50 } |
52 if (id != -1) | 51 if (id != -1) |
53 { | 52 { |
54 cur = wp->w_match_head; | 53 cur = wp->w_match_head; |
1214 } | 1213 } |
1215 if (error == TRUE) | 1214 if (error == TRUE) |
1216 return; | 1215 return; |
1217 if (id >= 1 && id <= 3) | 1216 if (id >= 1 && id <= 3) |
1218 { | 1217 { |
1219 semsg(_("E798: ID is reserved for \":match\": %d"), id); | 1218 semsg(_(e_id_is_reserved_for_match_nr), id); |
1220 return; | 1219 return; |
1221 } | 1220 } |
1222 | 1221 |
1223 rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, | 1222 rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, |
1224 conceal_char); | 1223 conceal_char); |
1282 return; | 1281 return; |
1283 | 1282 |
1284 // id == 3 is ok because matchaddpos() is supposed to substitute :3match | 1283 // id == 3 is ok because matchaddpos() is supposed to substitute :3match |
1285 if (id == 1 || id == 2) | 1284 if (id == 1 || id == 2) |
1286 { | 1285 { |
1287 semsg(_("E798: ID is reserved for \":match\": %d"), id); | 1286 semsg(_(e_id_is_reserved_for_match_nr), id); |
1288 return; | 1287 return; |
1289 } | 1288 } |
1290 | 1289 |
1291 rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, | 1290 rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, |
1292 conceal_char); | 1291 conceal_char); |