Mercurial > vim
comparison src/bufwrite.c @ 26865:bce848ec8b1b v8.2.3961
patch 8.2.3961: error messages are spread out
Commit: https://github.com/vim/vim/commit/436b5adc9770a2568209dd5ab1f98bd1afc91898
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 31 22:49:24 2021 +0000
patch 8.2.3961: 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 00:00:04 +0100 |
parents | 6ee19c6ae8a2 |
children | 06a137af96f8 |
comparison
equal
deleted
inserted
replaced
26864:eb95ad159bce | 26865:bce848ec8b1b |
---|---|
1480 break; | 1480 break; |
1481 } | 1481 } |
1482 ui_breakcheck(); | 1482 ui_breakcheck(); |
1483 if (got_int) | 1483 if (got_int) |
1484 { | 1484 { |
1485 errmsg = (char_u *)_(e_interr); | 1485 errmsg = (char_u *)_(e_interrupted); |
1486 break; | 1486 break; |
1487 } | 1487 } |
1488 } | 1488 } |
1489 | 1489 |
1490 if (close(bfd) < 0 && errmsg == NULL) | 1490 if (close(bfd) < 0 && errmsg == NULL) |
1647 && !(exiting && backup != NULL)) | 1647 && !(exiting && backup != NULL)) |
1648 { | 1648 { |
1649 ml_preserve(buf, FALSE); | 1649 ml_preserve(buf, FALSE); |
1650 if (got_int) | 1650 if (got_int) |
1651 { | 1651 { |
1652 errmsg = (char_u *)_(e_interr); | 1652 errmsg = (char_u *)_(e_interrupted); |
1653 goto restore_backup; | 1653 goto restore_backup; |
1654 } | 1654 } |
1655 } | 1655 } |
1656 | 1656 |
1657 #ifdef VMS | 1657 #ifdef VMS |
2293 vim_snprintf((char *)errmsg, 300, _(e_write_error_conversion_failed_in_line_nr_make_fenc_empty_to_override), | 2293 vim_snprintf((char *)errmsg, 300, _(e_write_error_conversion_failed_in_line_nr_make_fenc_empty_to_override), |
2294 (long)write_info.bw_conv_error_lnum); | 2294 (long)write_info.bw_conv_error_lnum); |
2295 } | 2295 } |
2296 } | 2296 } |
2297 else if (got_int) | 2297 else if (got_int) |
2298 errmsg = (char_u *)_(e_interr); | 2298 errmsg = (char_u *)_(e_interrupted); |
2299 else | 2299 else |
2300 errmsg = (char_u *)_(e_write_error_file_system_full); | 2300 errmsg = (char_u *)_(e_write_error_file_system_full); |
2301 } | 2301 } |
2302 | 2302 |
2303 // If we have a backup file, try to put it in place of the new file, | 2303 // If we have a backup file, try to put it in place of the new file, |
2313 { | 2313 { |
2314 // This may take a while, if we were interrupted let the user | 2314 // This may take a while, if we were interrupted let the user |
2315 // know we got the message. | 2315 // know we got the message. |
2316 if (got_int) | 2316 if (got_int) |
2317 { | 2317 { |
2318 msg(_(e_interr)); | 2318 msg(_(e_interrupted)); |
2319 out_flush(); | 2319 out_flush(); |
2320 } | 2320 } |
2321 if ((fd = mch_open((char *)backup, O_RDONLY | O_EXTRA, 0)) >= 0) | 2321 if ((fd = mch_open((char *)backup, O_RDONLY | O_EXTRA, 0)) >= 0) |
2322 { | 2322 { |
2323 if ((write_info.bw_fd = mch_open((char *)fname, | 2323 if ((write_info.bw_fd = mch_open((char *)fname, |