Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
if (addr_count == 2)
{
if (*arg) // both range and argument is not allowed
- return ex_errmsg(e_trailing_arg, arg);
+ return ex_errmsg(e_trailing_characters_str, arg);
bnr = start_bnr;
}
else // addr_count == 1
{
// This can happen during startup when there is a stray "w" in the
// vimrc file.
- emsg(_(e_emptybuf));
+ emsg(_(e_empty_buffer));
return FAIL;
}
{
if (ret == NULL)
{
- char *err = _(e_invexprmsg);
+ char *err = _(e_invalid_expression_received);
size_t len = STRLEN(cmd) + STRLEN(err) + 5;
char_u *msg;
else
{
*end = i;
- semsg(_(e_trailing_arg), arg);
+ semsg(_(e_trailing_characters_str), arg);
return;
}
}
end = arg;
if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
{
- semsg(_(e_trailing_arg), end);
+ semsg(_(e_trailing_characters_str), end);
return;
}
if (*skipwhite(*arg) == ':')
semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg);
else
- semsg(_(e_missing_dict_colon), *arg);
+ semsg(_(e_missing_colon_in_dictionary), *arg);
clear_tv(&tvkey);
goto failret;
}
item = dict_find(d, key, -1);
if (item != NULL)
{
- semsg(_(e_duplicate_key), key);
+ semsg(_(e_duplicate_key_in_dicitonary), key);
clear_tv(&tvkey);
clear_tv(&tv);
goto failret;
if (**arg == ',')
semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg);
else
- semsg(_(e_missing_dict_comma), *arg);
+ semsg(_(e_missing_comma_in_dictionary), *arg);
goto failret;
}
}
if (textwinlock != 0 || textlock != 0
|| ins_compl_active() || compl_busy || pum_visible())
{
- emsg(_(e_textwinlock));
+ emsg(_(e_not_allowed_to_change_text_or_change_window));
return FALSE;
}
ins_compl_clear(); // clear stuff for CTRL-X mode
EXTERN char e_cannot_allocate_color_str[]
INIT(= N_("E254: Cannot allocate color %s"));
#endif
+#if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
+EXTERN char e_couldnt_read_in_sign_data[]
+ INIT(= N_("E255: Couldn't read in sign data"));
+#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[]
+ INIT(= N_("E359: Screen mode setting not supported"));
+#endif
+EXTERN char e_pattern_uses_more_memory_than_maxmempattern[]
+ INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
#ifdef FEAT_LIBCALL
EXTERN char e_library_call_failed_for_str[]
INIT(= N_("E364: Library call failed for \"%s()\""));
EXTERN char e_could_not_load_library_function_str[]
INIT(= N_("E448: Could not load library function %s"));
#endif
+#ifdef FEAT_CLIENTSERVER
+EXTERN char e_invalid_expression_received[]
+ INIT(= N_("E449: Invalid expression received"));
+#endif
#if defined(UNIX) || defined(FEAT_SESSION)
EXTERN char e_cannot_go_back_to_previous_directory[]
INIT(= N_("E459: Cannot go back to previous directory"));
EXTERN char e_illegal_variable_name_str[]
INIT(= N_("E461: Illegal variable name: %s"));
#endif
+#ifdef FEAT_NETBEANS_INTG
+EXTERN char e_region_is_guarded_cannot_modify[]
+ INIT(= N_("E463: Region is guarded, cannot modify"));
+#endif
EXTERN char e_ambiguous_use_of_user_defined_command[]
INIT(= N_("E464: Ambiguous use of user-defined command"));
EXTERN char e_command_aborted[]
INIT(= N_("E480: No match: %s"));
EXTERN char e_no_range_allowed[]
INIT(= N_("E481: No range allowed"));
+EXTERN char e_trailing_characters[]
+ INIT(= N_("E488: Trailing characters"));
+EXTERN char e_trailing_characters_str[]
+ INIT(= N_("E488: Trailing characters: %s"));
// E502
EXTERN char e_is_a_directory[]
INIT(= N_("E516: No buffers were deleted"));
EXTERN char e_no_buffers_were_wiped_out[]
INIT(= N_("E517: No buffers were wiped out"));
+EXTERN char e_not_allowed_here[]
+ INIT(= N_("E523: Not allowed here"));
+EXTERN char e_not_allowed_to_change_text_or_change_window[]
+ INIT(= N_("E565: Not allowed to change text or change window"));
+EXTERN char e_not_allowed_to_change_text_here[]
+ INIT(= N_("E578: Not allowed to change text here"));
#ifdef FEAT_EVAL
EXTERN char e_endwhile_without_while[]
INIT(= N_("E588: :endwhile without :while"));
EXTERN char e_endfor_without_for[]
INIT(= N_("E588: :endfor without :for"));
+EXTERN char e_winheight_cannot_be_smaller_than_winminheight[]
+ INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
+EXTERN char e_winwidth_cannot_be_smaller_than_winminwidth[]
+ INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
+
EXTERN char e_missing_endtry[]
INIT(= N_("E600: Missing :endtry"));
EXTERN char e_endtry_without_try[]
INIT(= N_("E676: No matching autocommands for acwrite buffer"));
EXTERN char e_buffer_nr_invalid_buffer_number[]
INIT(= N_("E680: <buffer=%d>: invalid buffer number"));
+EXTERN char e_invalid_search_pattern_or_delimiter[]
+ INIT(= N_("E682: Invalid search pattern or delimiter"));
#ifdef FEAT_EVAL
EXTERN char e_list_index_out_of_range_nr[]
INIT(= N_("E684: list index out of range: %ld"));
INIT(= N_("E716: Key not present in Dictionary: \"%s\""));
EXTERN char e_cannot_slice_dictionary[]
INIT(= N_("E719: Cannot slice a Dictionary"));
+EXTERN char e_missing_colon_in_dictionary[]
+ INIT(= N_("E720: Missing colon in Dictionary: %s"));
+EXTERN char e_duplicate_key_in_dicitonary[]
+ INIT(= N_("E721: Duplicate key in Dictionary: \"%s\""));
+EXTERN char e_missing_comma_in_dictionary[]
+ INIT(= N_("E722: Missing comma in Dictionary: %s"));
+EXTERN char e_missing_dict_end[]
+ INIT(= N_("E723: Missing end of Dictionary '}': %s"));
EXTERN char e_wrong_variable_type_for_str_equal[]
INIT(= N_("E734: Wrong variable type for %s="));
EXTERN char e_value_is_locked[]
EXTERN char e_cannot_change_value_of_str[]
INIT(= N_("E742: Cannot change value of %s"));
#endif
+#ifdef FEAT_NETBEANS_INTG
+EXTERN char e_netbeans_does_not_allow_changes_in_read_only_files[]
+ INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
+#endif
+EXTERN char e_empty_buffer[]
+ INIT(= N_("E749: empty buffer"));
#ifdef FEAT_SPELL
EXTERN char e_spell_checking_is_not_possible[]
INIT(= N_("E756: Spell checking is not possible"));
#endif
+#if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC)
+EXTERN char e_option_str_is_not_set[]
+ INIT(= N_("E764: Option '%s' is not set"));
+#endif
#ifdef FEAT_QUICKFIX
EXTERN char e_no_location_list[]
INIT(= N_("E776: No location list"));
EXTERN char e_cannot_use_percent_with_float[]
INIT(= N_("E804: Cannot use '%' with Float"));
#endif
+#ifdef FEAT_FLOAT
+EXTERN char e_using_float_as_string[]
+ INIT(= N_("E806: using Float as a String"));
+#endif
+EXTERN char e_cannot_close_autocmd_or_popup_window[]
+ INIT(= N_("E813: Cannot close autocmd or popup window"));
EXTERN char e_blowfish_big_little_endian_use_wrong[]
INIT(= N_("E817: Blowfish big/little endian use wrong"));
EXTERN char e_sha256_test_failed[]
EXTERN char e_conflicts_with_value_of_fillchars[]
INIT(= N_("E835: Conflicts with value of 'fillchars'"));
// E839 unused
+#ifndef FEAT_CLIPBOARD
+EXTERN char e_invalid_register_name[]
+ INIT(= N_("E850: Invalid register name"));
+#endif
EXTERN char e_autocommands_caused_command_to_abort[]
INIT(= N_("E855: Autocommands caused command to abort"));
#ifdef FEAT_EVAL
INIT(= N_("E908: using an invalid value as a String: %s"));
EXTERN char e_cannot_index_special_variable[]
INIT(= N_("E909: Cannot index a special variable"));
+#endif
+EXTERN char e_directory_not_found_in_str_str[]
+ INIT(= N_("E919: Directory not found in '%s': \"%s\""));
+#ifdef FEAT_EVAL
EXTERN char e_string_required[]
INIT(= N_("E928: String required"));
#endif
INIT(= N_("E936: Cannot delete the current group"));
EXTERN char e_attempt_to_delete_buffer_that_is_in_use_str[]
INIT(= N_("E937: Attempt to delete a buffer that is in use: %s"));
+EXTERN char e_positive_count_required[]
+ INIT(= N_("E939: Positive count required"));
#ifdef FEAT_TERMINAL
EXTERN char e_job_still_running[]
INIT(= N_("E948: Job still running"));
#endif
EXTERN char e_file_changed_while_writing[]
INIT(= N_("E949: File changed while writing"));
+EXTERN char e_autocommand_caused_recursive_behavior[]
+ INIT(= N_("E952: Autocommand caused recursive behavior"));
EXTERN char_u e_invalid_column_number_nr[]
INIT(= N_("E964: Invalid column number: %ld"));
EXTERN char_u e_invalid_line_number_nr[]
if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
&& *p != '[' && *p != '.')
{
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return NULL;
}
&& (!in_vim9script() || !vim9_bad_comment(p)))
{
if (end_error)
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
else
semsg(_(e_invalid_expression_str), arg);
}
case VAR_FLOAT:
#ifdef FEAT_FLOAT
if (verbose)
- emsg(_(e_float_as_string));
+ emsg(_(e_using_float_as_string));
return FAIL;
#endif
case VAR_BOOL:
rettv->vval.v_number = 0;
}
else if (*s != NUL)
- semsg(_(e_trailing_arg), s);
+ semsg(_(e_trailing_characters_str), s);
}
/*
if (*end != NUL)
{
semsg(_(lv.ll_name == lv.ll_name_end
- ? e_invalid_argument_str : e_trailing_arg), end);
+ ? e_invalid_argument_str : e_trailing_characters_str), end);
}
else
{
p = skiptowhite(marker);
if (*skipwhite(p) != NUL && *skipwhite(p) != comment_char)
{
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return NULL;
}
*p = NUL;
if (vim9script)
{
if (!ends_excmd2(eap->cmd, skipwhite(argend)))
- semsg(_(e_trailing_arg), argend);
+ semsg(_(e_trailing_characters_str), argend);
else
// Vim9 declaration ":var name: type"
arg = vim9_declare_scriptvar(eap, arg);
{
emsg_severe = TRUE;
if (!did_emsg)
- semsg(_(e_trailing_arg), arg);
+ semsg(_(e_trailing_characters_str), arg);
break;
}
}
if (name_end != NULL)
{
emsg_severe = TRUE;
- semsg(_(e_trailing_arg), name_end);
+ semsg(_(e_trailing_characters_str), name_end);
}
if (!(eap->skip || error))
clear_lval(&lv);
clear_lval(redir_lval);
if (redir_endp != NULL && *redir_endp != NUL)
// Trailing characters are present after the variable name
- semsg(_(e_trailing_arg), redir_endp);
+ semsg(_(e_trailing_characters_str), redir_endp);
else
semsg(_(e_invalid_argument_str), name);
redir_endp = NULL; // don't store a value, only cleanup
i = getdigits(&cmd);
if (i <= 0 && !eap->skip && subflags.do_error)
{
- emsg(_(e_zerocount));
+ emsg(_(e_positive_count_required));
return;
}
eap->line1 = eap->line2;
set_nextcmd(eap, cmd);
if (eap->nextcmd == NULL)
{
- semsg(_(e_trailing_arg), cmd);
+ semsg(_(e_trailing_characters_str), cmd);
return;
}
}
|| changedtick != CHANGEDTICK(curbuf)) && !ex_no_reprint)
{
if (curbuf->b_ml.ml_flags & ML_EMPTY)
- emsg(_(e_emptybuf));
+ emsg(_(e_empty_buffer));
else
{
if (ex_pressedreturn)
else if (ex_pressedreturn && !ex_no_reprint) // must be at EOF
{
if (curbuf->b_ml.ml_flags & ML_EMPTY)
- emsg(_(e_emptybuf));
+ emsg(_(e_empty_buffer));
else
emsg(_("E501: At end-of-file"));
}
// check these explicitly for a more specific error message
if (*ea.arg == '*' || *ea.arg == '+')
{
- errormsg = _(e_invalidreg);
+ errormsg = _(e_invalid_register_name);
goto doend;
}
#endif
ea.arg = skipwhite(ea.arg);
if (n <= 0 && !ni && (ea.argt & EX_ZEROR) == 0)
{
- errormsg = _(e_zerocount);
+ errormsg = _(e_positive_count_required);
goto doend;
}
if (ea.addr_type != ADDR_LINES) // e.g. :buffer 2, :sleep 3
&& *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & EX_TRLBAR) == 0))
{
// no arguments allowed but there is something
- errormsg = ex_errmsg(e_trailing_arg, ea.arg);
+ errormsg = ex_errmsg(e_trailing_characters_str, ea.arg);
goto doend;
}
if (ERROR_IF_ANY_POPUP_WINDOW)
return;
if (*eap->arg)
- eap->errmsg = ex_errmsg(e_trailing_arg, eap->arg);
+ eap->errmsg = ex_errmsg(e_trailing_characters_str, eap->arg);
else
{
if (eap->addr_count == 0) // default is current buffer
// Never close the autocommand window.
if (win == aucmd_win)
{
- emsg(_(e_autocmd_close));
+ emsg(_(e_cannot_close_autocmd_or_popup_window));
return;
}
ex_print(exarg_T *eap)
{
if (curbuf->b_ml.ml_flags & ML_EMPTY)
- emsg(_(e_emptybuf));
+ emsg(_(e_empty_buffer));
else
{
for ( ;!got_int; ui_breakcheck())
if (*eap->arg == NUL)
shell_resized();
else
- emsg(_(e_screenmode));
+ emsg(_(e_screen_mode_setting_not_supported));
}
/*
if (*eap->arg == NUL) // No argument?
emsg(_(e_argument_required));
else if (eap->arg[1] != NUL) // more than one character?
- semsg(_(e_trailing_arg), eap->arg);
+ semsg(_(e_trailing_characters_str), eap->arg);
else
{
pos = curwin->w_cursor; // save curwin->w_cursor
if (ex_normal_lock > 0)
{
- emsg(_(e_secure));
+ emsg(_(e_not_allowed_here));
return;
}
if (ex_normal_busy >= p_mmd)
// Check for trailing illegal characters
if (!ends_excmd2(eap->arg, p))
- eap->errmsg = ex_errmsg(e_trailing_arg, p);
+ eap->errmsg = ex_errmsg(e_trailing_characters_str, p);
else
set_nextcmd(eap, p);
}
if (end != NULL && *end != NUL
&& !ends_excmd2(end, skipwhite(end + 1)))
{
- semsg(_(e_trailing_arg), end);
+ semsg(_(e_trailing_characters_str), end);
return;
}
return e_invalid_in_cmdline_window;
#endif
if (textwinlock != 0)
- return e_textwinlock;
- return e_textlock;
+ return e_not_allowed_to_change_text_or_change_window;
+ return e_not_allowed_to_change_text_here;
}
/*
* Some error messages that can be shared are included here.
* They should be moved to errors.h.
*/
-EXTERN char e_secure[] INIT(= N_("E523: Not allowed here"));
-EXTERN char e_textlock[] INIT(= N_("E578: Not allowed to change text here"));
-EXTERN char e_textwinlock[] INIT(= N_("E565: Not allowed to change text or change window"));
-#if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
- || defined(UNIX) || defined(VMS)
-EXTERN char e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
-#endif
-#if defined(FEAT_SIGN_ICONS) && !defined(FEAT_GUI_GTK)
-EXTERN char e_signdata[] INIT(= N_("E255: Couldn't read in sign data!"));
-#endif
-EXTERN char e_trailing[] INIT(= N_("E488: Trailing characters"));
-EXTERN char e_trailing_arg[] INIT(= N_("E488: Trailing characters: %s"));
-EXTERN char e_winheight[] INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
-EXTERN char e_winwidth[] INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
-EXTERN char e_zerocount[] INIT(= N_("E939: Positive count required"));
-#ifdef FEAT_EVAL
-EXTERN char e_missing_dict_colon[] INIT(= N_("E720: Missing colon in Dictionary: %s"));
-EXTERN char e_duplicate_key[] INIT(= N_("E721: Duplicate key in Dictionary: \"%s\""));
-EXTERN char e_missing_dict_comma[] INIT(= N_("E722: Missing comma in Dictionary: %s"));
-EXTERN char e_missing_dict_end[] INIT(= N_("E723: Missing end of Dictionary '}': %s"));
-#endif
-#ifdef FEAT_CLIENTSERVER
-EXTERN char e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
-#endif
-#ifdef FEAT_NETBEANS_INTG
-EXTERN char e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
-EXTERN char e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
-#endif
-EXTERN char e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
-EXTERN char e_emptybuf[] INIT(= N_("E749: empty buffer"));
-
-EXTERN char e_invalpat[] INIT(= N_("E682: Invalid search pattern or delimiter"));
-#if defined(FEAT_SYN_HL) || defined(FEAT_COMPL_FUNC)
-EXTERN char e_notset[] INIT(= N_("E764: Option '%s' is not set"));
-#endif
-#ifndef FEAT_CLIPBOARD
-EXTERN char e_invalidreg[] INIT(= N_("E850: Invalid register name"));
-#endif
-#ifdef FEAT_FLOAT
-EXTERN char e_float_as_string[] INIT(= N_("E806: using Float as a String"));
-#endif
-EXTERN char e_dirnotf[] INIT(= N_("E919: Directory not found in '%s': \"%s\""));
-EXTERN char e_au_recursive[] INIT(= N_("E952: Autocommand caused recursive behavior"));
-EXTERN char e_autocmd_close[] INIT(= N_("E813: Cannot close autocmd or popup window"));
#ifdef FEAT_MENU
EXTERN char e_menuothermode[] INIT(= N_("E328: Menu only exists in another mode"));
#endif
{
if (sign.hImage)
close_signicon_image(&sign);
- emsg(_(e_signdata));
+ emsg(_(e_couldnt_read_in_sign_data));
}
return (void *)psign;
// gui.sign_width = sign->width + 8;
}
else
- emsg(_(e_signdata));
+ emsg(_(e_couldnt_read_in_sign_data));
}
return (void *)sign;
ga_concat(&reply, res);
else
{
- ga_concat(&reply, (char_u *)_(e_invexprmsg));
+ ga_concat(&reply, (char_u *)_(e_invalid_expression_received));
ga_append(&reply, 0);
ga_concat(&reply, (char_u *)"-c 1");
}
funcname = get_complete_funcname(ctrl_x_mode);
if (*funcname == NUL)
{
- semsg(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
+ semsg(_(e_option_str_is_not_set), ctrl_x_mode == CTRL_X_FUNCTION
? "completefunc" : "omnifunc");
return FAIL;
}
if (cur_item->v_type == VAR_FLOAT)
{
// cannot use a float as a key
- emsg(_(e_float_as_string));
+ emsg(_(e_using_float_as_string));
retval = FAIL;
goto theend;
}
json_skip_white(reader);
if (reader->js_buf[reader->js_used] != NUL)
{
- semsg(_(e_trailing_arg), reader->js_buf + reader->js_used);
+ semsg(_(e_trailing_characters_str), reader->js_buf + reader->js_used);
return FAIL;
}
return OK;
if (*end != NUL && !ends_excmd2(end, skipwhite(end + 1)))
{
vim_free(g);
- eap->errmsg = ex_errmsg(e_trailing_arg, end);
+ eap->errmsg = ex_errmsg(e_trailing_characters_str, end);
return;
}
if (*end != *p)
}
else if (*map_to != NUL && (unmenu || enable != MAYBE))
{
- semsg(_(e_trailing_arg), map_to);
+ semsg(_(e_trailing_characters_str), map_to);
goto theend;
}
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
if (vim_strchr((char_u *)"?!&<", nextchar) != NULL
&& arg[1] != NUL && !VIM_ISWHITE(arg[1]))
{
- errmsg = e_trailing;
+ errmsg = e_trailing_characters;
goto skip;
}
}
}
if (nextchar != '?'
&& nextchar != NUL && !VIM_ISWHITE(afterchar))
- errmsg = e_trailing;
+ errmsg = e_trailing_characters;
}
else
{
*/
if (nextchar != NUL && !VIM_ISWHITE(afterchar))
{
- errmsg = e_trailing;
+ errmsg = e_trailing_characters;
goto skip;
}
if (prefix == 2) // inv
|| sandbox != 0
#endif
) && (options[opt_idx].flags & P_SECURE))
- return e_secure;
+ return e_not_allowed_here;
#if defined(FEAT_EVAL)
// Save the global value before changing anything. This is needed as for
|| sandbox != 0
#endif
) && (options[opt_idx].flags & P_SECURE))
- return e_secure;
+ return e_not_allowed_here;
#if defined(FEAT_EVAL)
// Save the global value before changing anything. This is needed as for
}
if (p_wmh > p_wh)
{
- errmsg = e_winheight;
+ errmsg = e_winheight_cannot_be_smaller_than_winminheight;
p_wh = p_wmh;
}
if (p_hh < 0)
}
if (p_wmh > p_wh)
{
- errmsg = e_winheight;
+ errmsg = e_winheight_cannot_be_smaller_than_winminheight;
p_wmh = p_wh;
}
win_setminheight();
}
if (p_wmw > p_wiw)
{
- errmsg = e_winwidth;
+ errmsg = e_winwidth_cannot_be_smaller_than_winminwidth;
p_wiw = p_wmw;
}
}
if (p_wmw > p_wiw)
{
- errmsg = e_winwidth;
+ errmsg = e_winwidth_cannot_be_smaller_than_winminwidth;
p_wmw = p_wiw;
}
win_setminwidth();
|| sandbox != 0
#endif
) && (get_option_flags(opt_idx) & P_SECURE))
- errmsg = e_secure;
+ errmsg = e_not_allowed_here;
// Check for a "normal" directory or file name in some options. Disallow a
// path separator (slash and/or backslash), wildcards and characters that
if (res == NULL)
{
- char *err = _(e_invexprmsg);
+ char *err = _(e_invalid_expression_received);
size_t len = STRLEN(str) + STRLEN(err) + 5;
res = alloc(len);
}
if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL)
{
- semsg(_(e_trailing_arg), arg);
+ semsg(_(e_trailing_characters_str), arg);
return;
}
qfl = qf_get_curlist(qi);
p = skip_vimgrep_pat(eap->arg, &args->spat, &args->flags);
if (p == NULL)
{
- emsg(_(e_invalpat));
+ emsg(_(e_invalid_search_pattern_or_delimiter));
return FAIL;
}
if (list_arg->v_type != VAR_LIST)
emsg(_(e_list_required));
else if (recursive != 0)
- emsg(_(e_au_recursive));
+ emsg(_(e_autocommand_caused_recursive_behavior));
else
{
list_T *l = list_arg->vval.v_list;
if (curchr == Magic(')'))
EMSG2_RET_NULL(_(e_unmatched_str_close), reg_magic == MAGIC_ALL);
else
- EMSG_RET_NULL(_(e_trailing)); // "Can't happen".
+ EMSG_RET_NULL(_(e_trailing_characters)); // "Can't happen".
// NOTREACHED
}
// Here we set the flag allowing back references to this set of
if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
{
- emsg(_(e_maxmempat));
+ emsg(_(e_pattern_uses_more_memory_than_maxmempattern));
return NULL;
}
if (ga_grow(®stack, sizeof(regitem_T)) == FAIL)
// a regstar_T on the regstack.
if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
{
- emsg(_(e_maxmempat));
+ emsg(_(e_pattern_uses_more_memory_than_maxmempattern));
status = RA_FAIL;
}
else if (ga_grow(®stack, sizeof(regstar_T)) == FAIL)
// Need a bit of room to store extra positions.
if ((long)((unsigned)regstack.ga_len >> 10) >= p_mmp)
{
- emsg(_(e_maxmempat));
+ emsg(_(e_pattern_uses_more_memory_than_maxmempattern));
status = RA_FAIL;
}
else if (ga_grow(®stack, sizeof(regbehind_T)) == FAIL)
if ((long)(newsize >> 10) >= p_mmp)
{
- emsg(_(e_maxmempat));
+ emsg(_(e_pattern_uses_more_memory_than_maxmempattern));
--depth;
return NULL;
}
if ((long)(newsize >> 10) >= p_mmp)
{
- emsg(_(e_maxmempat));
+ emsg(_(e_pattern_uses_more_memory_than_maxmempattern));
return NULL;
}
newl = alloc(newsize);
char *basepath = path == p_rtp ? "runtimepath" : "packpath";
if (flags & DIP_ERR)
- semsg(_(e_dirnotf), basepath, name);
+ semsg(_(e_directory_not_found_in_str_str), basepath, name);
else if (p_verbose > 0)
{
verbose_enter();
filename = arg;
*buf = buflist_findnr((int)getdigits(&arg));
if (*skipwhite(arg) != NUL)
- semsg(_(e_trailing_arg), arg);
+ semsg(_(e_trailing_characters_str), arg);
break;
}
else
if (*curwin->w_s->b_p_spf == NUL)
{
- semsg(_(e_notset), "spellfile");
+ semsg(_(e_option_str_is_not_set), "spellfile");
return;
}
fnamebuf = alloc(MAXPATHL);
// caller of getcmdline() may get confused.
if (textwinlock != 0 || textlock != 0)
{
- emsg(_(e_textlock));
+ emsg(_(e_not_allowed_to_change_text_here));
return FALSE;
}
{
if (netbeans_is_guarded(top, bot))
{
- emsg(_(e_guarded));
+ emsg(_(e_region_is_guarded_cannot_modify));
return FAIL;
}
if (curbuf->b_p_ro)
{
- emsg(_(e_nbreadonly));
+ emsg(_(e_netbeans_does_not_allow_changes_in_read_only_files));
return FAIL;
}
}
if (!ends_excmd2(*arg, skipwhite(*arg + 1)))
{
- semsg(_(e_trailing_arg), *arg + 1);
+ semsg(_(e_trailing_characters_str), *arg + 1);
return FAIL;
}
{
if (!ends_excmd(*skipwhite(p)))
{
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
goto ret_free;
}
set_nextcmd(eap, p);
&& (vim9script || eap->cmdidx == CMD_def))
&& !eap->skip
&& !did_emsg)
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
/*
* Read the body of the function, until "}", ":endfunction" or ":enddef" is
if (!ends_excmd(*skipwhite(p)))
{
vim_free(name);
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return;
}
set_nextcmd(eap, p);
if (!failed && !aborting())
{
emsg_severe = TRUE;
- semsg(_(e_trailing_arg), arg);
+ semsg(_(e_trailing_characters_str), arg);
}
}
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3970,
/**/
3969,
/**/
}
if (!ends_excmd2(arg, skipwhite(p)))
{
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return NULL;
}
if (cctx->ctx_skip == SKIP_YES)
if (!ends_excmd2(arg, skipwhite(p)))
{
clear_ppconst(&ppconst);
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return NULL;
}
if (scope->se_skip_save == SKIP_YES)
if (!ends_excmd2(arg, skipwhite(p)))
{
- semsg(_(e_trailing_arg), p);
+ semsg(_(e_trailing_characters_str), p);
return NULL;
}
|| GA_GROW_FAILS(&cctx->ctx_instr, 1))
{
if (trailing_error)
- semsg(_(e_trailing_arg), cmd);
+ semsg(_(e_trailing_characters_str), cmd);
clear_instr_ga(&cctx->ctx_instr);
cctx->ctx_instr = save_ga;
return NULL;
&& !(*line == '#' && (line == cctx.ctx_line_start
|| VIM_ISWHITE(line[-1]))))
{
- semsg(_(e_trailing_arg), line);
+ semsg(_(e_trailing_characters_str), line);
goto erret;
}
else if (line != NULL && vim9_bad_comment(skipwhite(line)))
if (item != NULL)
{
SOURCING_LNUM = iptr->isn_lnum;
- semsg(_(e_duplicate_key), key);
+ semsg(_(e_duplicate_key_in_dicitonary), key);
dict_unref(dict);
goto on_error;
}
|| GA_GROW_FAILS(&cctx->ctx_instr, 1))
{
if (trailing_error)
- semsg(_(e_trailing_arg), s);
+ semsg(_(e_trailing_characters_str), s);
clear_instr_ga(&cctx->ctx_instr);
cctx->ctx_instr = save_ga;
++cctx->ctx_type_stack.ga_len;
item = dict_find(d, key, -1);
if (item != NULL)
{
- semsg(_(e_duplicate_key), key);
+ semsg(_(e_duplicate_key_in_dicitonary), key);
goto failret;
}
item = dictitem_alloc(key);
if (*skipwhite(*arg) == ':')
semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg);
else
- semsg(_(e_missing_dict_colon), *arg);
+ semsg(_(e_missing_colon_in_dictionary), *arg);
return FAIL;
}
whitep = *arg + 1;
break;
if (**arg != ',')
{
- semsg(_(e_missing_dict_comma), *arg);
+ semsg(_(e_missing_comma_in_dictionary), *arg);
goto failret;
}
if (IS_WHITE_OR_NUL(*whitep))
p = *arg;
if (!eval_isnamec1(*p))
{
- semsg(_(e_trailing_arg), pstart);
+ semsg(_(e_trailing_characters_str), pstart);
return FAIL;
}
if (ASCII_ISALPHA(*p) && p[1] == ':')
return FAIL; // window is already being closed
if (win_unlisted(win))
{
- emsg(_(e_autocmd_close));
+ emsg(_(e_cannot_close_autocmd_or_popup_window));
return FAIL;
}
if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())