Mercurial > vim
comparison src/spell.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 | 06a137af96f8 |
children | fb4c30606b4a |
comparison
equal
deleted
inserted
replaced
26957:e5b81e2bed22 | 26958:d92e0d85923f |
---|---|
476 if (byts[arridx] == 0) | 476 if (byts[arridx] == 0) |
477 { | 477 { |
478 if (endidxcnt == MAXWLEN) | 478 if (endidxcnt == MAXWLEN) |
479 { | 479 { |
480 // Must be a corrupted spell file. | 480 // Must be a corrupted spell file. |
481 emsg(_(e_format)); | 481 emsg(_(e_format_error_in_spell_file)); |
482 return; | 482 return; |
483 } | 483 } |
484 endlen[endidxcnt] = wlen; | 484 endlen[endidxcnt] = wlen; |
485 endidx[endidxcnt++] = arridx++; | 485 endidx[endidxcnt++] = arridx++; |
486 --len; | 486 --len; |
2093 spell_load_lang(lang); | 2093 spell_load_lang(lang); |
2094 // SpellFileMissing autocommands may do anything, including | 2094 // SpellFileMissing autocommands may do anything, including |
2095 // destroying the buffer we are using... | 2095 // destroying the buffer we are using... |
2096 if (!bufref_valid(&bufref)) | 2096 if (!bufref_valid(&bufref)) |
2097 { | 2097 { |
2098 ret_msg = N_("E797: SpellFileMissing autocommand deleted buffer"); | 2098 ret_msg = N_(e_spellfilemising_autocommand_deleted_buffer); |
2099 goto theend; | 2099 goto theend; |
2100 } | 2100 } |
2101 } | 2101 } |
2102 } | 2102 } |
2103 | 2103 |
2879 int save_ws = p_ws; | 2879 int save_ws = p_ws; |
2880 linenr_T prev_lnum = 0; | 2880 linenr_T prev_lnum = 0; |
2881 | 2881 |
2882 if (repl_from == NULL || repl_to == NULL) | 2882 if (repl_from == NULL || repl_to == NULL) |
2883 { | 2883 { |
2884 emsg(_("E752: No previous spell replacement")); | 2884 emsg(_(e_no_previous_spell_replacement)); |
2885 return; | 2885 return; |
2886 } | 2886 } |
2887 addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from)); | 2887 addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from)); |
2888 | 2888 |
2889 frompat = alloc(STRLEN(repl_from) + 7); | 2889 frompat = alloc(STRLEN(repl_from) + 7); |
2929 p_ws = save_ws; | 2929 p_ws = save_ws; |
2930 curwin->w_cursor = pos; | 2930 curwin->w_cursor = pos; |
2931 vim_free(frompat); | 2931 vim_free(frompat); |
2932 | 2932 |
2933 if (sub_nsubs == 0) | 2933 if (sub_nsubs == 0) |
2934 semsg(_("E753: Not found: %s"), repl_from); | 2934 semsg(_(e_not_found_str), repl_from); |
2935 else | 2935 else |
2936 do_sub_msg(FALSE); | 2936 do_sub_msg(FALSE); |
2937 } | 2937 } |
2938 | 2938 |
2939 /* | 2939 /* |