Patch 8.2.3983

10 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 2, 2022, 12:01:19 PM1/2/22
to vim...@googlegroups.com

Patch 8.2.3983
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
Files: src/errors.h, src/ex_docmd.c, src/fileio.c, src/filepath.c,
src/findfile.c, src/hardcopy.c, src/memfile.c, src/memline.c,
src/menu.c, src/normal.c, src/regexp_bt.c


*** ../vim-8.2.3982/src/errors.h 2022-01-02 01:04:04.472033094 +0000
--- src/errors.h 2022-01-02 17:00:05.758117590 +0000
***************
*** 703,717 ****
EXTERN char e_didnt_get_block_nr_two[]
INIT(= N_("E298: Didn't get block nr 2?"));
// E299 unused
!
#ifdef FEAT_MENU
EXTERN char e_menu_only_exists_in_another_mode[]
INIT(= N_("E328: Menu only exists in another mode"));
#endif
EXTERN char e_internal_error_lalloc_zero[]
INIT(= N_("E341: Internal error: lalloc(0, )"));
EXTERN char e_out_of_memory_allocating_nr_bytes[]
INIT(= N_("E342: Out of memory! (allocating %lu bytes)"));
#if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
|| defined(UNIX) || defined(VMS)
EXTERN char e_screen_mode_setting_not_supported[]
--- 703,818 ----
EXTERN char e_didnt_get_block_nr_two[]
INIT(= N_("E298: Didn't get block nr 2?"));
// E299 unused
! EXTERN char e_swap_file_already_exists_symlink_attack[]
! INIT(= N_("E300: Swap file already exists (symlink attack?)"));
! EXTERN char e_oops_lost_the_swap_file[]
! INIT(= N_("E301: Oops, lost the swap file!!!"));
! EXTERN char e_could_not_rename_swap_file[]
! INIT(= N_("E302: Could not rename swap file"));
! EXTERN char e_unable_to_open_swap_file_for_str_recovery_impossible[]
! INIT(= N_("E303: Unable to open swap file for \"%s\", recovery impossible"));
! EXTERN char e_ml_upd_block0_didnt_get_block_zero[]
! INIT(= N_("E304: ml_upd_block0(): Didn't get block 0??"));
! EXTERN char e_no_swap_file_found_for_str[]
! INIT(= N_("E305: No swap file found for %s"));
! EXTERN char e_cannot_open_str[]
! INIT(= N_("E306: Cannot open %s"));
! EXTERN char e_str_does_not_look_like_vim_swap_file[]
! INIT(= N_("E307: %s does not look like a Vim swap file"));
! EXTERN char e_warning_original_file_may_have_been_changed[]
! INIT(= N_("E308: Warning: Original file may have been changed"));
! EXTERN char e_unable_to_read_block_one_from_str[]
! INIT(= N_("E309: Unable to read block 1 from %s"));
! EXTERN char e_block_one_id_wrong_str_not_swp_file[]
! INIT(= N_("E310: Block 1 ID wrong (%s not a .swp file?)"));
! EXTERN char e_recovery_interrupted[]
! INIT(= N_("E311: Recovery Interrupted"));
! EXTERN char e_errors_detected_while_recovering_look_for_lines_starting_with_questions[]
! INIT(= N_("E312: Errors detected while recovering; look for lines starting with ???"));
! EXTERN char e_cannot_preserve_there_is_no_swap_file[]
! INIT(= N_("E313: Cannot preserve, there is no swap file"));
! EXTERN char e_preserve_failed[]
! INIT(= N_("E314: Preserve failed"));
! EXTERN char e_ml_get_invalid_lnum_nr[]
! INIT(= N_("E315: ml_get: invalid lnum: %ld"));
! EXTERN char e_ml_get_cannot_find_line_nr_in_buffer_nr_str[]
! INIT(= N_("E316: ml_get: cannot find line %ld in buffer %d %s"));
! EXTERN char e_pointer_block_id_wrong[]
! INIT(= N_("E317: pointer block id wrong"));
! EXTERN char e_pointer_block_id_wrong_two[]
! INIT(= N_("E317: pointer block id wrong 2"));
! EXTERN char e_pointer_block_id_wrong_three[]
! INIT(= N_("E317: pointer block id wrong 3"));
! EXTERN char e_pointer_block_id_wrong_four[]
! INIT(= N_("E317: pointer block id wrong 4"));
! EXTERN char e_updated_too_many_blocks[]
! INIT(= N_("E318: Updated too many blocks?"));
! EXTERN char e_sorry_command_is_not_available_in_this_version[]
! INIT(= N_("E319: Sorry, the command is not available in this version"));
! EXTERN char e_cannot_find_line_nr[]
! INIT(= N_("E320: Cannot find line %ld"));
! EXTERN char e_could_not_reload_str[]
! INIT(= N_("E321: Could not reload \"%s\""));
! EXTERN char e_line_number_out_of_range_nr_past_the_end[]
! INIT(= N_("E322: line number out of range: %ld past the end"));
! EXTERN char e_line_count_wrong_in_block_nr[]
! INIT(= N_("E323: line count wrong in block %ld"));
! #ifdef FEAT_POSTSCRIPT
! EXTERN char e_cant_open_postscript_output_file[]
! INIT(= N_("E324: Can't open PostScript output file"));
! #endif
! EXTERN char e_attention[]
! INIT(= N_("E325: ATTENTION"));
! EXTERN char e_too_many_swap_files_found[]
! INIT(= N_("E326: Too many swap files found"));
! EXTERN char_u e_part_of_menu_item_path_is_not_sub_menu[]
! INIT(= N_("E327: Part of menu-item path is not sub-menu"));
#ifdef FEAT_MENU
EXTERN char e_menu_only_exists_in_another_mode[]
INIT(= N_("E328: Menu only exists in another mode"));
#endif
+ EXTERN char_u e_no_menu_str[]
+ INIT(= N_("E329: No menu \"%s\""));
+ EXTERN char e_menu_path_must_not_loead_to_sub_menu[]
+ INIT(= N_("E330: Menu path must not lead to a sub-menu"));
+ EXTERN char e_must_not_add_menu_items_directly_to_menu_bar[]
+ INIT(= N_("E331: Must not add menu items directly to menu bar"));
+ EXTERN char e_separator_cannot_be_part_of_menu_path[]
+ INIT(= N_("E332: Separator cannot be part of a menu path"));
+ EXTERN char e_menu_path_must_lead_to_menu_item[]
+ INIT(= N_("E333: Menu path must lead to a menu item"));
+ EXTERN char e_menu_not_found_str[]
+ INIT(= N_("E334: Menu not found: %s"));
+ EXTERN char e_menu_not_defined_for_str_mode[]
+ INIT(= N_("E335: Menu not defined for %s mode"));
+ EXTERN char e_menu_path_must_lead_to_sub_menu[]
+ INIT(= N_("E336: Menu path must lead to a sub-menu"));
+ EXTERN char e_menu_not_found_check_menu_names[]
+ INIT(= N_("E337: Menu not found - check menu names"));
+ EXTERN char e_sorry_no_file_browser_in_console_mode[]
+ INIT(= N_("E338: Sorry, no file browser in console mode"));
+ EXTERN char e_pattern_too_long[]
+ INIT(= N_("E339: Pattern too long"));
+ // E340 unused
EXTERN char e_internal_error_lalloc_zero[]
INIT(= N_("E341: Internal error: lalloc(0, )"));
EXTERN char e_out_of_memory_allocating_nr_bytes[]
INIT(= N_("E342: Out of memory! (allocating %lu bytes)"));
+ EXTERN char e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str[]
+ INIT(= N_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."));
+ EXTERN char e_cant_find_directory_str_in_cdpath[]
+ INIT(= N_("E344: Can't find directory \"%s\" in cdpath"));
+ EXTERN char e_cant_find_file_str_in_path[]
+ INIT(= N_("E345: Can't find file \"%s\" in path"));
+ EXTERN char e_no_more_directory_str_found_in_cdpath[]
+ INIT(= N_("E346: No more directory \"%s\" found in cdpath"));
+ EXTERN char e_no_more_file_str_found_in_path[]
+ INIT(= N_("E347: No more file \"%s\" found in path"));
+ EXTERN char e_no_string_under_cursor[]
+ INIT(= N_("E348: No string under cursor"));
+ EXTERN char e_no_identifier_under_cursor[]
+ INIT(= N_("E349: No identifier under cursor"));
+
#if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
|| defined(UNIX) || defined(VMS)
EXTERN char e_screen_mode_setting_not_supported[]
*** ../vim-8.2.3982/src/ex_docmd.c 2022-01-01 15:58:19.110486371 +0000
--- src/ex_docmd.c 2022-01-02 16:35:52.316080044 +0000
***************
*** 4540,4546 ****
{
if (!eap->skip)
eap->errmsg =
! _("E319: Sorry, the command is not available in this version");
}

#ifdef HAVE_EX_SCRIPT_NI
--- 4540,4546 ----
{
if (!eap->skip)
eap->errmsg =
! _(e_sorry_command_is_not_available_in_this_version);
}

#ifdef HAVE_EX_SCRIPT_NI
*** ../vim-8.2.3982/src/fileio.c 2022-01-01 19:33:46.769076797 +0000
--- src/fileio.c 2022-01-02 16:42:06.179239997 +0000
***************
*** 4402,4408 ****
#if defined(FEAT_EVAL)
if (!aborting())
#endif
! semsg(_("E321: Could not reload \"%s\""), buf->b_fname);
if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf)
{
// Put the text back from the save buffer. First
--- 4402,4408 ----
#if defined(FEAT_EVAL)
if (!aborting())
#endif
! semsg(_(e_could_not_reload_str), buf->b_fname);
if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf)
{
// Put the text back from the save buffer. First
*** ../vim-8.2.3982/src/filepath.c 2022-01-01 14:19:44.040353857 +0000
--- src/filepath.c 2022-01-02 16:47:35.738523239 +0000
***************
*** 2464,2470 ****
# endif
{
// TODO: non-GUI file selector here
! emsg(_("E338: Sorry, no file browser in console mode"));
fname = NULL;
}

--- 2464,2470 ----
# endif
{
// TODO: non-GUI file selector here
! emsg(_(e_sorry_no_file_browser_in_console_mode));
fname = NULL;
}

*** ../vim-8.2.3982/src/findfile.c 2021-12-27 17:21:38.004449137 +0000
--- src/findfile.c 2022-01-02 16:55:42.766233557 +0000
***************
*** 520,526 ****
wc_part = (char_u *)errpt;
if (*wc_part != NUL && !vim_ispathsep(*wc_part))
{
! semsg(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
goto error_return;
}
}
--- 520,526 ----
wc_part = (char_u *)errpt;
if (*wc_part != NUL && !vim_ispathsep(*wc_part))
{
! semsg(_(e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str), PATHSEPSTR);
goto error_return;
}
}
***************
*** 1905,1923 ****
if (first == TRUE)
{
if (find_what == FINDFILE_DIR)
! semsg(_("E344: Can't find directory \"%s\" in cdpath"),
ff_file_to_find);
else
! semsg(_("E345: Can't find file \"%s\" in path"),
ff_file_to_find);
}
else
{
if (find_what == FINDFILE_DIR)
! semsg(_("E346: No more directory \"%s\" found in cdpath"),
ff_file_to_find);
else
! semsg(_("E347: No more file \"%s\" found in path"),
ff_file_to_find);
}
}
--- 1905,1923 ----
if (first == TRUE)
{
if (find_what == FINDFILE_DIR)
! semsg(_(e_cant_find_directory_str_in_cdpath),
ff_file_to_find);
else
! semsg(_(e_cant_find_file_str_in_path),
ff_file_to_find);
}
else
{
if (find_what == FINDFILE_DIR)
! semsg(_(e_no_more_directory_str_found_in_cdpath),
ff_file_to_find);
else
! semsg(_(e_no_more_file_str_found_in_path),
ff_file_to_find);
}
}
*** ../vim-8.2.3982/src/hardcopy.c 2022-01-01 14:19:44.040353857 +0000
--- src/hardcopy.c 2022-01-02 16:43:00.787120148 +0000
***************
*** 2641,2647 ****
}
if (prt_ps_fd == NULL)
{
! emsg(_("E324: Can't open PostScript output file"));
mch_print_cleanup();
return FAIL;
}
--- 2641,2647 ----
}
if (prt_ps_fd == NULL)
{
! emsg(_(e_cant_open_postscript_output_file));
mch_print_cleanup();
return FAIL;
}
*** ../vim-8.2.3982/src/memfile.c 2022-01-01 21:59:11.034521924 +0000
--- src/memfile.c 2022-01-02 16:30:47.236804659 +0000
***************
*** 1264,1270 ****
if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0)
{
mfp->mf_fd = -1;
! emsg(_("E300: Swap file already exists (symlink attack?)"));
}
else
#endif
--- 1264,1270 ----
if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0)
{
mfp->mf_fd = -1;
! emsg(_(e_swap_file_already_exists_symlink_attack));
}
else
#endif
*** ../vim-8.2.3982/src/memline.c 2022-01-01 21:59:11.034521924 +0000
--- src/memline.c 2022-01-02 16:45:16.634824025 +0000
***************
*** 719,725 ****
if (mfp->mf_fd < 0)
{
// could not (re)open the swap file, what can we do????
! emsg(_("E301: Oops, lost the swap file!!!"));
return;
}
#ifdef HAVE_FD_CLOEXEC
--- 719,725 ----
if (mfp->mf_fd < 0)
{
// could not (re)open the swap file, what can we do????
! emsg(_(e_oops_lost_the_swap_file));
return;
}
#ifdef HAVE_FD_CLOEXEC
***************
*** 731,737 ****
#endif
}
if (!success)
! emsg(_("E302: Could not rename swap file"));
}

/*
--- 731,737 ----
#endif
}
if (!success)
! emsg(_(e_could_not_rename_swap_file));
}

/*
***************
*** 823,829 ****
{
need_wait_return = TRUE; // call wait_return later
++no_wait_return;
! (void)semsg(_("E303: Unable to open swap file for \"%s\", recovery impossible"),
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
--no_wait_return;
}
--- 823,829 ----
{
need_wait_return = TRUE; // call wait_return later
++no_wait_return;
! (void)semsg(_(e_unable_to_open_swap_file_for_str_recovery_impossible),
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
--no_wait_return;
}
***************
*** 959,965 ****

b0p = (ZERO_BL *)(hp->bh_data);
if (ml_check_b0_id(b0p) == FAIL)
! iemsg(_("E304: ml_upd_block0(): Didn't get block 0??"));
else
{
if (what == UB_FNAME)
--- 959,965 ----

b0p = (ZERO_BL *)(hp->bh_data);
if (ml_check_b0_id(b0p) == FAIL)
! iemsg(_(e_ml_upd_block0_didnt_get_block_zero));
else
{
if (what == UB_FNAME)
***************
*** 1209,1215 ****
len = recover_names(fname, FALSE, 0, NULL);
if (len == 0) // no swap files found
{
! semsg(_("E305: No swap file found for %s"), fname);
goto theend;
}
if (len == 1) // one swap file found, use it
--- 1209,1215 ----
len = recover_names(fname, FALSE, 0, NULL);
if (len == 0) // no swap files found
{
! semsg(_(e_no_swap_file_found_for_str), fname);
goto theend;
}
if (len == 1) // one swap file found, use it
***************
*** 1266,1272 ****
if (mfp == NULL || mfp->mf_fd < 0)
{
if (fname_used != NULL)
! semsg(_("E306: Cannot open %s"), fname_used);
goto theend;
}
buf->b_ml.ml_mfp = mfp;
--- 1266,1272 ----
if (mfp == NULL || mfp->mf_fd < 0)
{
if (fname_used != NULL)
! semsg(_(e_cannot_open_str), fname_used);
goto theend;
}
buf->b_ml.ml_mfp = mfp;
***************
*** 1308,1314 ****
}
if (ml_check_b0_id(b0p) == FAIL)
{
! semsg(_("E307: %s does not look like a Vim swap file"), mfp->mf_fname);
goto theend;
}
if (b0_magic_wrong(b0p))
--- 1308,1314 ----
}
if (ml_check_b0_id(b0p) == FAIL)
{
! semsg(_(e_str_does_not_look_like_vim_swap_file), mfp->mf_fname);
goto theend;
}
if (b0_magic_wrong(b0p))
***************
*** 1410,1416 ****
&& ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
&& org_stat.st_mtime > swp_stat.st_mtime)
|| org_stat.st_mtime != mtime))
! emsg(_("E308: Warning: Original file may have been changed"));
out_flush();

// Get the 'fileformat' and 'fileencoding' from block zero.
--- 1410,1416 ----
&& ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
&& org_stat.st_mtime > swp_stat.st_mtime)
|| org_stat.st_mtime != mtime))
! emsg(_(e_warning_original_file_may_have_been_changed));
out_flush();

// Get the 'fileformat' and 'fileencoding' from block zero.
***************
*** 1514,1520 ****
{
if (bnum == 1)
{
! semsg(_("E309: Unable to read block 1 from %s"), mfp->mf_fname);
goto theend;
}
++error;
--- 1514,1520 ----
{
if (bnum == 1)
{
! semsg(_(e_unable_to_read_block_one_from_str), mfp->mf_fname);
goto theend;
}
++error;
***************
*** 1600,1606 ****
{
if (bnum == 1)
{
! semsg(_("E310: Block 1 ID wrong (%s not a .swp file?)"),
mfp->mf_fname);
goto theend;
}
--- 1600,1606 ----
{
if (bnum == 1)
{
! semsg(_(e_block_one_id_wrong_str_not_swp_file),
mfp->mf_fname);
goto theend;
}
***************
*** 1721,1732 ****

recoverymode = FALSE;
if (got_int)
! emsg(_("E311: Recovery Interrupted"));
else if (error)
{
++no_wait_return;
msg(">>>>>>>>>>>>>");
! emsg(_("E312: Errors detected while recovering; look for lines starting with ???"));
--no_wait_return;
msg(_("See \":help E312\" for more information."));
msg(">>>>>>>>>>>>>");
--- 1721,1732 ----

recoverymode = FALSE;
if (got_int)
! emsg(_(e_recovery_interrupted));
else if (error)
{
++no_wait_return;
msg(">>>>>>>>>>>>>");
! emsg(_(e_errors_detected_while_recovering_look_for_lines_starting_with_questions));
--no_wait_return;
msg(_("See \":help E312\" for more information."));
msg(">>>>>>>>>>>>>");
***************
*** 2485,2491 ****
if (mfp == NULL || mfp->mf_fname == NULL)
{
if (message)
! emsg(_("E313: Cannot preserve, there is no swap file"));
return;
}

--- 2485,2491 ----
if (mfp == NULL || mfp->mf_fname == NULL)
{
if (message)
! emsg(_(e_cannot_preserve_there_is_no_swap_file));
return;
}

***************
*** 2540,2546 ****
if (status == OK)
msg(_("File preserved"));
else
! emsg(_("E314: Preserve failed"));
}
}

--- 2540,2546 ----
if (status == OK)
msg(_("File preserved"));
else
! emsg(_(e_preserve_failed));
}
}

***************
*** 2615,2621 ****
// Avoid giving this message for a recursive call, may happen when
// the GUI redraws part of the text.
++recursive;
! siemsg(_("E315: ml_get: invalid lnum: %ld"), lnum);
--recursive;
}
errorret:
--- 2615,2621 ----
// Avoid giving this message for a recursive call, may happen when
// the GUI redraws part of the text.
++recursive;
! siemsg(_(e_ml_get_invalid_lnum_nr), lnum);
--recursive;
}
errorret:
***************
*** 2660,2666 ****
++recursive;
get_trans_bufname(buf);
shorten_dir(NameBuff);
! siemsg(_("E316: ml_get: cannot find line %ld in buffer %d %s"),
lnum, buf->b_fnum, NameBuff);
--recursive;
}
--- 2660,2666 ----
++recursive;
get_trans_bufname(buf);
shorten_dir(NameBuff);
! siemsg(_(e_ml_get_cannot_find_line_nr_in_buffer_nr_str),
lnum, buf->b_fnum, NameBuff);
--recursive;
}
***************
*** 3114,3120 ****
pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_("E317: pointer block id wrong 3"));
mf_put(mfp, hp, FALSE, FALSE);
goto theend;
}
--- 3114,3120 ----
pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_(e_pointer_block_id_wrong_three));
mf_put(mfp, hp, FALSE, FALSE);
goto theend;
}
***************
*** 3256,3262 ****
*/
if (stack_idx < 0)
{
! iemsg(_("E318: Updated too many blocks?"));
buf->b_ml.ml_stack_top = 0; // invalidate stack
}
}
--- 3256,3262 ----
*/
if (stack_idx < 0)
{
! iemsg(_(e_updated_too_many_blocks));
buf->b_ml.ml_stack_top = 0; // invalidate stack
}
}
***************
*** 3713,3719 ****
pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_("E317: pointer block id wrong 4"));
mf_put(mfp, hp, FALSE, FALSE);
goto theend;
}
--- 3713,3719 ----
pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_(e_pointer_block_id_wrong_four));
mf_put(mfp, hp, FALSE, FALSE);
goto theend;
}
***************
*** 3978,3984 ****

hp = ml_find_line(buf, lnum, ML_FIND);
if (hp == NULL)
! siemsg(_("E320: Cannot find line %ld"), lnum);
else
{
dp = (DATA_BL *)(hp->bh_data);
--- 3978,3984 ----

hp = ml_find_line(buf, lnum, ML_FIND);
if (hp == NULL)
! siemsg(_(e_cannot_find_line_nr), lnum);
else
{
dp = (DATA_BL *)(hp->bh_data);
***************
*** 4238,4244 ****
pp = (PTR_BL *)(dp); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_("E317: pointer block id wrong"));
goto error_block;
}

--- 4238,4244 ----
pp = (PTR_BL *)(dp); // must be pointer block
if (pp->pb_id != PTR_ID)
{
! iemsg(_(e_pointer_block_id_wrong));
goto error_block;
}

***************
*** 4283,4293 ****
if (idx >= (int)pp->pb_count) // past the end: something wrong!
{
if (lnum > buf->b_ml.ml_line_count)
! siemsg(_("E322: line number out of range: %ld past the end"),
lnum - buf->b_ml.ml_line_count);

else
! siemsg(_("E323: line count wrong in block %ld"), bnum);
goto error_block;
}
if (action == ML_DELETE)
--- 4283,4293 ----
if (idx >= (int)pp->pb_count) // past the end: something wrong!
{
if (lnum > buf->b_ml.ml_line_count)
! siemsg(_(e_line_number_out_of_range_nr_past_the_end),
lnum - buf->b_ml.ml_line_count);

else
! siemsg(_(e_line_count_wrong_in_block_nr), bnum);
goto error_block;
}
if (action == ML_DELETE)
***************
*** 4380,4386 ****
if (pp->pb_id != PTR_ID)
{
mf_put(mfp, hp, FALSE, FALSE);
! iemsg(_("E317: pointer block id wrong 2"));
break;
}
pp->pb_pointer[ip->ip_index].pe_line_count += count;
--- 4380,4386 ----
if (pp->pb_id != PTR_ID)
{
mf_put(mfp, hp, FALSE, FALSE);
! iemsg(_(e_pointer_block_id_wrong_two));
break;
}
pp->pb_pointer[ip->ip_index].pe_line_count += count;
***************
*** 4594,4600 ****
time_t swap_mtime;

++no_wait_return;
! (void)emsg(_("E325: ATTENTION"));
msg_puts(_("\nFound a swap file by the name \""));
msg_home_replace(fname);
msg_puts("\"\n");
--- 4594,4600 ----
time_t swap_mtime;

++no_wait_return;
! (void)emsg(_(e_attention));
msg_puts(_("\nFound a swap file by the name \""));
msg_home_replace(fname);
msg_puts("\"\n");
***************
*** 5141,5147 ****
{
if (fname[n - 2] == 'a') // ".saa": tried enough, give up
{
! emsg(_("E326: Too many swap files found"));
VIM_CLEAR(fname);
break;
}
--- 5141,5147 ----
{
if (fname[n - 2] == 'a') // ".saa": tried enough, give up
{
! emsg(_(e_too_many_swap_files_found));
VIM_CLEAR(fname);
break;
}
*** ../vim-8.2.3982/src/menu.c 2022-01-01 16:20:56.900401501 +0000
--- src/menu.c 2022-01-02 16:51:24.458124485 +0000
***************
*** 59,67 ****
// The character for each menu mode
static char *menu_mode_chars[] = {"n", "v", "s", "o", "i", "c", "tl", "t"};

- static char_u e_notsubmenu[] = N_("E327: Part of menu-item path is not sub-menu");
- static char_u e_nomenu[] = N_("E329: No menu \"%s\"");
-
#ifdef FEAT_TOOLBAR
static const char *toolbar_names[] =
{
--- 59,64 ----
***************
*** 533,539 ****
if (*next_name == NUL && menu->children != NULL)
{
if (!sys_menu)
! emsg(_("E330: Menu path must not lead to a sub-menu"));
goto erret;
}
if (*next_name != NUL && menu->children == NULL
--- 530,536 ----
if (*next_name == NUL && menu->children != NULL)
{
if (!sys_menu)
! emsg(_(e_menu_path_must_not_loead_to_sub_menu));
goto erret;
}
if (*next_name != NUL && menu->children == NULL
***************
*** 543,549 ****
)
{
if (!sys_menu)
! emsg(_(e_notsubmenu));
goto erret;
}
break;
--- 540,546 ----
)
{
if (!sys_menu)
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
goto erret;
}
break;
***************
*** 572,584 ****
{
if (*next_name == NUL && parent == NULL)
{
! emsg(_("E331: Must not add menu items directly to menu bar"));
goto erret;
}

if (menu_is_separator(dname) && *next_name != NUL)
{
! emsg(_("E332: Separator cannot be part of a menu path"));
goto erret;
}

--- 569,581 ----
{
if (*next_name == NUL && parent == NULL)
{
! emsg(_(e_must_not_add_menu_items_directly_to_menu_bar));
goto erret;
}

if (menu_is_separator(dname) && *next_name != NUL)
{
! emsg(_(e_separator_cannot_be_part_of_menu_path));
goto erret;
}

***************
*** 871,877 ****
{
if (menu->children == NULL)
{
! emsg(_(e_notsubmenu));
return FAIL;
}
if (menu_nable_recurse(menu->children, p, modes, enable)
--- 868,874 ----
{
if (menu->children == NULL)
{
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
return FAIL;
}
if (menu_nable_recurse(menu->children, p, modes, enable)
***************
*** 896,902 ****
}
if (*name != NUL && *name != '*' && menu == NULL)
{
! semsg(_(e_nomenu), name);
return FAIL;
}

--- 893,899 ----
}
if (*name != NUL && *name != '*' && menu == NULL)
{
! semsg(_(e_no_menu_str), name);
return FAIL;
}

***************
*** 937,943 ****
if (*p != NUL && menu->children == NULL)
{
if (!silent)
! emsg(_(e_notsubmenu));
return FAIL;
}
if ((menu->modes & modes) != 0x0)
--- 934,940 ----
if (*p != NUL && menu->children == NULL)
{
if (!silent)
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
return FAIL;
}
if ((menu->modes & modes) != 0x0)
***************
*** 989,995 ****
if (menu == NULL)
{
if (!silent)
! semsg(_(e_nomenu), name);
return FAIL;
}

--- 986,992 ----
if (menu == NULL)
{
if (!silent)
! semsg(_(e_no_menu_str), name);
return FAIL;
}

***************
*** 1127,1133 ****
// Found menu
if (*p != NUL && menu->children == NULL)
{
! emsg(_(e_notsubmenu));
vim_free(path_name);
return FAIL;
}
--- 1124,1130 ----
// Found menu
if (*p != NUL && menu->children == NULL)
{
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
vim_free(path_name);
return FAIL;
}
***************
*** 1143,1149 ****
}
if (menu == NULL)
{
! semsg(_(e_nomenu), name);
vim_free(path_name);
return FAIL;
}
--- 1140,1146 ----
}
if (menu == NULL)
{
! semsg(_(e_no_menu_str), name);
vim_free(path_name);
return FAIL;
}
***************
*** 2423,2429 ****
default:
mode = (char_u *)"Normal";
}
! semsg(_("E335: Menu not defined for %s mode"), mode);
}
}

--- 2420,2426 ----
default:
mode = (char_u *)"Normal";
}
! semsg(_(e_menu_not_defined_for_str_mode), mode);
}
}

***************
*** 2457,2469 ****
{
if (*p == NUL && menu->children != NULL)
{
! emsg(_("E333: Menu path must lead to a menu item"));
gave_emsg = TRUE;
menu = NULL;
}
else if (*p != NUL && menu->children == NULL)
{
! emsg(_(e_notsubmenu));
menu = NULL;
}
break;
--- 2454,2466 ----
{
if (*p == NUL && menu->children != NULL)
{
! emsg(_(e_menu_path_must_lead_to_menu_item));
gave_emsg = TRUE;
menu = NULL;
}
else if (*p != NUL && menu->children == NULL)
{
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
menu = NULL;
}
break;
***************
*** 2479,2485 ****
if (menu == NULL)
{
if (!gave_emsg)
! semsg(_("E334: Menu not found: %s"), name_arg);
return NULL;
}

--- 2476,2482 ----
if (menu == NULL)
{
if (!gave_emsg)
! semsg(_(e_menu_not_found_str), name_arg);
return NULL;
}

***************
*** 2609,2617 ****
{
// found a menu item instead of a sub-menu
if (*p == NUL)
! emsg(_("E336: Menu path must lead to a sub-menu"));
else
! emsg(_(e_notsubmenu));
menu = NULL;
goto theend;
}
--- 2606,2614 ----
{
// found a menu item instead of a sub-menu
if (*p == NUL)
! emsg(_(e_menu_path_must_lead_to_sub_menu));
else
! emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
menu = NULL;
goto theend;
}
***************
*** 2630,2636 ****
}

if (menu == NULL)
! emsg(_("E337: Menu not found - check menu names"));
theend:
vim_free(saved_name);
return menu;
--- 2627,2633 ----
}

if (menu == NULL)
! emsg(_(e_menu_not_found_check_menu_names));
theend:
vim_free(saved_name);
return menu;
*** ../vim-8.2.3982/src/normal.c 2021-12-28 20:59:51.979937080 +0000
--- src/normal.c 2022-01-02 16:57:27.462208708 +0000
***************
*** 128,135 ****
#endif
static void nv_cursorhold(cmdarg_T *cap);

- static char *e_noident = N_("E349: No identifier under cursor");
-
/*
* Function to be called for a Normal or Visual mode command.
* The argument is a cmdarg_T.
--- 128,133 ----
***************
*** 1645,1653 ****
if ((find_type & FIND_NOERROR) == 0)
{
if (find_type & FIND_STRING)
! emsg(_("E348: No string under cursor"));
else
! emsg(_(e_noident));
}
return 0;
}
--- 1643,1651 ----
if ((find_type & FIND_NOERROR) == 0)
{
if (find_type & FIND_STRING)
! emsg(_(e_no_string_under_cursor));
else
! emsg(_(e_no_identifier_under_cursor));
}
return 0;
}
***************
*** 3683,3689 ****
|| STRCMP(kp, ":help") == 0);
if (kp_help && *skipwhite(ptr) == NUL)
{
! emsg(_(e_noident)); // found white space only
return;
}
kp_ex = (*kp == ':');
--- 3681,3687 ----
|| STRCMP(kp, ":help") == 0);
if (kp_help && *skipwhite(ptr) == NUL)
{
! emsg(_(e_no_identifier_under_cursor)); // found white space only
return;
}
kp_ex = (*kp == ':');
***************
*** 3734,3740 ****
}
if (n == 0)
{
! emsg(_(e_noident)); // found dashes only
vim_free(buf);
return;
}
--- 3732,3739 ----
}
if (n == 0)
{
! // found dashes only
! emsg(_(e_no_identifier_under_cursor));
vim_free(buf);
return;
}
*** ../vim-8.2.3982/src/regexp_bt.c 2022-01-01 15:58:19.118486361 +0000
--- src/regexp_bt.c 2022-01-02 16:52:24.382175985 +0000
***************
*** 2517,2523 ****
{
vim_free(r);
if (reg_toolong)
! EMSG_RET_NULL(_("E339: Pattern too long"));
return NULL;
}

--- 2517,2523 ----
{
vim_free(r);
if (reg_toolong)
! EMSG_RET_NULL(_(e_pattern_too_long));
return NULL;
}

*** ../vim-8.2.3982/src/version.c 2022-01-02 16:16:30.523363109 +0000
--- src/version.c 2022-01-02 16:57:34.382205973 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 3983,
/**/

--
hundred-and-one symptoms of being an internet addict:
194. Your business cards contain your e-mail and home page address.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages