Skip to content

Commit

Permalink
patch 8.2.4246: one error message not in errors.h
Browse files Browse the repository at this point in the history
Problem:    One error message not in errors.h. (Antonio Colombo)
Solution:   Move the message and rename.
  • Loading branch information
brammool committed Jan 28, 2022
1 parent 652dee4 commit e96eea7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/errors.h
Expand Up @@ -747,7 +747,10 @@ EXTERN char e_didnt_get_block_nr_one[]
INIT(= N_("E298: Didn't get block nr 1?"));
EXTERN char e_didnt_get_block_nr_two[]
INIT(= N_("E298: Didn't get block nr 2?"));
// E299 unused
#ifdef FEAT_PERL
EXTERN char e_perl_evaluation_forbidden_in_sandbox_without_safe_module[]
INIT(= N_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
#endif
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[]
Expand Down
5 changes: 2 additions & 3 deletions src/if_perl.xs
Expand Up @@ -1030,7 +1030,6 @@ VIM_init(void)
#ifdef DYNAMIC_PERL
static char *e_noperl = N_("Sorry, this command is disabled: the Perl library could not be loaded.");
#endif
static char *e_perlsandbox = N_("E299: Perl evaluation forbidden in sandbox without the Safe module");

/*
* ":perl"
Expand Down Expand Up @@ -1084,7 +1083,7 @@ ex_perl(exarg_T *eap)
safe = perl_get_sv("VIM::safe", FALSE);
# ifndef MAKE_TEST /* avoid a warning for unreachable code */
if (safe == NULL || !SvTRUE(safe))
emsg(_(e_perlsandbox));
emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module));
else
# endif
{
Expand Down Expand Up @@ -1361,7 +1360,7 @@ do_perleval(char_u *str, typval_T *rettv)
safe = get_sv("VIM::safe", FALSE);
# ifndef MAKE_TEST /* avoid a warning for unreachable code */
if (safe == NULL || !SvTRUE(safe))
emsg(_(e_perlsandbox));
emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module));
else
# endif
{
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4246,
/**/
4245,
/**/
Expand Down

0 comments on commit e96eea7

Please sign in to comment.