Mercurial > vim
comparison src/buffer.c @ 26439:b18f3b0f317c v8.2.3750
patch 8.2.3750: error messages are everywhere
Commit: https://github.com/vim/vim/commit/40bcec1bac34d34a3d4d7c5f6b2cc1f163acbd00
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 5 22:19:27 2021 +0000
patch 8.2.3750: error messages are everywhere
Problem: Error messages are everywhere.
Solution: Move more error messages to errors.h and adjust the names.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Dec 2021 23:30:05 +0100 |
parents | 8aba638e91eb |
children | 255bc9a08e58 |
comparison
equal
deleted
inserted
replaced
26438:c725b8e17f1f | 26439:b18f3b0f317c |
---|---|
191 break; | 191 break; |
192 // If there is no memfile at all, exit. | 192 // If there is no memfile at all, exit. |
193 // This is OK, since there are no changes to lose. | 193 // This is OK, since there are no changes to lose. |
194 if (curbuf == NULL) | 194 if (curbuf == NULL) |
195 { | 195 { |
196 emsg(_("E82: Cannot allocate any buffer, exiting...")); | 196 emsg(_(e_cannot_allocate_any_buffer_exiting)); |
197 | 197 |
198 // Don't try to do any saving, with "curbuf" NULL almost nothing | 198 // Don't try to do any saving, with "curbuf" NULL almost nothing |
199 // will work. | 199 // will work. |
200 v_dying = 2; | 200 v_dying = 2; |
201 getout(2); | 201 getout(2); |
202 } | 202 } |
203 | 203 |
204 emsg(_("E83: Cannot allocate buffer, using other one...")); | 204 emsg(_(e_cannot_allocate_buffer_using_other_one)); |
205 enter_buffer(curbuf); | 205 enter_buffer(curbuf); |
206 #ifdef FEAT_SYN_HL | 206 #ifdef FEAT_SYN_HL |
207 if (old_tw != curbuf->b_p_tw) | 207 if (old_tw != curbuf->b_p_tw) |
208 check_colorcolumn(curwin); | 208 check_colorcolumn(curwin); |
209 #endif | 209 #endif |
1180 buf_T *buf = curbuf; | 1180 buf_T *buf = curbuf; |
1181 bufref_T bufref; | 1181 bufref_T bufref; |
1182 | 1182 |
1183 if (action == DOBUF_UNLOAD) | 1183 if (action == DOBUF_UNLOAD) |
1184 { | 1184 { |
1185 emsg(_("E90: Cannot unload last buffer")); | 1185 emsg(_(e_cannot_unload_last_buffer)); |
1186 return FAIL; | 1186 return FAIL; |
1187 } | 1187 } |
1188 | 1188 |
1189 set_bufref(&bufref, buf); | 1189 set_bufref(&bufref, buf); |
1190 if (close_others) | 1190 if (close_others) |
1253 } | 1253 } |
1254 while (buf != curbuf && !bufIsChanged(buf)); | 1254 while (buf != curbuf && !bufIsChanged(buf)); |
1255 } | 1255 } |
1256 if (!bufIsChanged(buf)) | 1256 if (!bufIsChanged(buf)) |
1257 { | 1257 { |
1258 emsg(_("E84: No modified buffer found")); | 1258 emsg(_(e_no_modified_buffer_found)); |
1259 return FAIL; | 1259 return FAIL; |
1260 } | 1260 } |
1261 } | 1261 } |
1262 else if (start == DOBUF_FIRST && count) // find specified buffer number | 1262 else if (start == DOBUF_FIRST && count) // find specified buffer number |
1263 { | 1263 { |
1292 bp = NULL; // use this buffer as new starting point | 1292 bp = NULL; // use this buffer as new starting point |
1293 } | 1293 } |
1294 if (bp == buf) | 1294 if (bp == buf) |
1295 { | 1295 { |
1296 // back where we started, didn't find anything. | 1296 // back where we started, didn't find anything. |
1297 emsg(_("E85: There is no listed buffer")); | 1297 emsg(_(e_there_is_no_listed_buffer)); |
1298 return FAIL; | 1298 return FAIL; |
1299 } | 1299 } |
1300 } | 1300 } |
1301 } | 1301 } |
1302 | 1302 |
1304 { | 1304 { |
1305 if (start == DOBUF_FIRST) | 1305 if (start == DOBUF_FIRST) |
1306 { | 1306 { |
1307 // don't warn when deleting | 1307 // don't warn when deleting |
1308 if (!unload) | 1308 if (!unload) |
1309 semsg(_(e_nobufnr), count); | 1309 semsg(_(e_buffer_nr_does_not_exist), count); |
1310 } | 1310 } |
1311 else if (dir == FORWARD) | 1311 else if (dir == FORWARD) |
1312 emsg(_("E87: Cannot go beyond last buffer")); | 1312 emsg(_(e_cannot_go_beyond_last_buffer)); |
1313 else | 1313 else |
1314 emsg(_("E88: Cannot go before first buffer")); | 1314 emsg(_(e_cannot_go_before_first_buffer)); |
1315 return FAIL; | 1315 return FAIL; |
1316 } | 1316 } |
1317 #ifdef FEAT_PROP_POPUP | 1317 #ifdef FEAT_PROP_POPUP |
1318 if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) | 1318 if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) |
1319 # ifdef FEAT_TERMINAL | 1319 # ifdef FEAT_TERMINAL |
1362 return FAIL; | 1362 return FAIL; |
1363 } | 1363 } |
1364 else | 1364 else |
1365 #endif | 1365 #endif |
1366 { | 1366 { |
1367 semsg(_("E89: No write since last change for buffer %d (add ! to override)"), | 1367 semsg(_(e_no_write_since_last_change_for_buffer_nr_add_bang_to_override), |
1368 buf->b_fnum); | 1368 buf->b_fnum); |
1369 return FAIL; | 1369 return FAIL; |
1370 } | 1370 } |
1371 } | 1371 } |
1372 | 1372 |