mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3970: error messages are spread out
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
This commit is contained in:
18
src/option.c
18
src/option.c
@@ -1509,7 +1509,7 @@ do_set(
|
||||
if (vim_strchr((char_u *)"?!&<", nextchar) != NULL
|
||||
&& arg[1] != NUL && !VIM_ISWHITE(arg[1]))
|
||||
{
|
||||
errmsg = e_trailing;
|
||||
errmsg = e_trailing_characters;
|
||||
goto skip;
|
||||
}
|
||||
}
|
||||
@@ -1566,7 +1566,7 @@ do_set(
|
||||
}
|
||||
if (nextchar != '?'
|
||||
&& nextchar != NUL && !VIM_ISWHITE(afterchar))
|
||||
errmsg = e_trailing;
|
||||
errmsg = e_trailing_characters;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1610,7 +1610,7 @@ do_set(
|
||||
*/
|
||||
if (nextchar != NUL && !VIM_ISWHITE(afterchar))
|
||||
{
|
||||
errmsg = e_trailing;
|
||||
errmsg = e_trailing_characters;
|
||||
goto skip;
|
||||
}
|
||||
if (prefix == 2) // inv
|
||||
@@ -2710,7 +2710,7 @@ set_bool_option(
|
||||
|| 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
|
||||
@@ -3304,7 +3304,7 @@ set_num_option(
|
||||
|| 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
|
||||
@@ -3350,7 +3350,7 @@ set_num_option(
|
||||
}
|
||||
if (p_wmh > p_wh)
|
||||
{
|
||||
errmsg = e_winheight;
|
||||
errmsg = e_winheight_cannot_be_smaller_than_winminheight;
|
||||
p_wh = p_wmh;
|
||||
}
|
||||
if (p_hh < 0)
|
||||
@@ -3378,7 +3378,7 @@ set_num_option(
|
||||
}
|
||||
if (p_wmh > p_wh)
|
||||
{
|
||||
errmsg = e_winheight;
|
||||
errmsg = e_winheight_cannot_be_smaller_than_winminheight;
|
||||
p_wmh = p_wh;
|
||||
}
|
||||
win_setminheight();
|
||||
@@ -3393,7 +3393,7 @@ set_num_option(
|
||||
}
|
||||
if (p_wmw > p_wiw)
|
||||
{
|
||||
errmsg = e_winwidth;
|
||||
errmsg = e_winwidth_cannot_be_smaller_than_winminwidth;
|
||||
p_wiw = p_wmw;
|
||||
}
|
||||
|
||||
@@ -3411,7 +3411,7 @@ set_num_option(
|
||||
}
|
||||
if (p_wmw > p_wiw)
|
||||
{
|
||||
errmsg = e_winwidth;
|
||||
errmsg = e_winwidth_cannot_be_smaller_than_winminwidth;
|
||||
p_wmw = p_wiw;
|
||||
}
|
||||
win_setminwidth();
|
||||
|
Reference in New Issue
Block a user