Mercurial > vim
comparison src/match.c @ 26962:85866e069c24 v8.2.4010
patch 8.2.4010: error messages are spread out
Commit: https://github.com/vim/vim/commit/9d00e4a8146862c17ed429dc6b1b43349acb2b5f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 5 17:49:15 2022 +0000
patch 8.2.4010: 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 19:00:06 +0100 |
parents | d92e0d85923f |
children | 5de60e0d65fa |
comparison
equal
deleted
inserted
replaced
26961:33c0467b3c52 | 26962:85866e069c24 |
---|---|
53 cur = wp->w_match_head; | 53 cur = wp->w_match_head; |
54 while (cur != NULL) | 54 while (cur != NULL) |
55 { | 55 { |
56 if (cur->id == id) | 56 if (cur->id == id) |
57 { | 57 { |
58 semsg(_("E801: ID already taken: %d"), id); | 58 semsg(_(e_id_already_taken_nr), id); |
59 return -1; | 59 return -1; |
60 } | 60 } |
61 cur = cur->next; | 61 cur = cur->next; |
62 } | 62 } |
63 } | 63 } |
231 int rtype = SOME_VALID; | 231 int rtype = SOME_VALID; |
232 | 232 |
233 if (id < 1) | 233 if (id < 1) |
234 { | 234 { |
235 if (perr == TRUE) | 235 if (perr == TRUE) |
236 semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"), | 236 semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id); |
237 id); | |
238 return -1; | 237 return -1; |
239 } | 238 } |
240 while (cur != NULL && cur->id != id) | 239 while (cur != NULL && cur->id != id) |
241 { | 240 { |
242 prev = cur; | 241 prev = cur; |
243 cur = cur->next; | 242 cur = cur->next; |
244 } | 243 } |
245 if (cur == NULL) | 244 if (cur == NULL) |
246 { | 245 { |
247 if (perr == TRUE) | 246 if (perr == TRUE) |
248 semsg(_("E803: ID not found: %d"), id); | 247 semsg(_(e_id_not_found_nr), id); |
249 return -1; | 248 return -1; |
250 } | 249 } |
251 if (cur == prev) | 250 if (cur == prev) |
252 wp->w_match_head = cur->next; | 251 wp->w_match_head = cur->next; |
253 else | 252 else |