diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-31 22:49:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-31 22:49:24 +0000 |
commit | 436b5adc9770a2568209dd5ab1f98bd1afc91898 (patch) | |
tree | 623dc85ee9a396b16f939f44d38138f882edc229 /src/option.c | |
parent | f1474d801bbdb73406dd3d1f931f515f99e86dfa (diff) | |
download | vim-git-436b5adc9770a2568209dd5ab1f98bd1afc91898.tar.gz |
patch 8.2.3961: error messages are spread outv8.2.3961
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/option.c b/src/option.c index 2aab253eb..2f81f8bb9 100644 --- a/src/option.c +++ b/src/option.c @@ -1325,7 +1325,7 @@ do_set( } if (arg[len] != '>') { - errmsg = e_invarg; + errmsg = e_invalid_argument; goto skip; } arg[len] = NUL; // put NUL after name @@ -1577,7 +1577,7 @@ do_set( { if (nextchar == '=' || nextchar == ':') { - errmsg = e_invarg; + errmsg = e_invalid_argument; goto skip; } @@ -1627,7 +1627,7 @@ do_set( if (vim_strchr((char_u *)"=:&<", nextchar) == NULL || prefix != 1) { - errmsg = e_invarg; + errmsg = e_invalid_argument; goto skip; } @@ -1669,7 +1669,7 @@ do_set( value = string_to_key(arg, FALSE); if (value == 0 && (long *)varp != &p_wcm) { - errmsg = e_invarg; + errmsg = e_invalid_argument; goto skip; } } @@ -3471,7 +3471,7 @@ set_num_option( } else if (curwin->w_p_fdc > 12) { - errmsg = e_invarg; + errmsg = e_invalid_argument; curwin->w_p_fdc = 12; } } @@ -3508,7 +3508,7 @@ set_num_option( { if (curbuf->b_p_iminsert < 0 || curbuf->b_p_iminsert > B_IMODE_LAST) { - errmsg = e_invarg; + errmsg = e_invalid_argument; curbuf->b_p_iminsert = B_IMODE_NONE; } p_iminsert = curbuf->b_p_iminsert; @@ -3525,7 +3525,7 @@ set_num_option( else if (pp == &p_imst) { if (p_imst != IM_ON_THE_SPOT && p_imst != IM_OVER_THE_SPOT) - errmsg = e_invarg; + errmsg = e_invalid_argument; } #endif @@ -3541,7 +3541,7 @@ set_num_option( { if (curbuf->b_p_imsearch < -1 || curbuf->b_p_imsearch > B_IMODE_LAST) { - errmsg = e_invarg; + errmsg = e_invalid_argument; curbuf->b_p_imsearch = B_IMODE_NONE; } p_imsearch = curbuf->b_p_imsearch; @@ -3601,7 +3601,7 @@ set_num_option( } else if (curwin->w_p_cole > 3) { - errmsg = e_invarg; + errmsg = e_invalid_argument; curwin->w_p_cole = 3; } } @@ -3616,7 +3616,7 @@ set_num_option( else if (pp == &p_pyx) { if (p_pyx != 0 && p_pyx != 2 && p_pyx != 3) - errmsg = e_invarg; + errmsg = e_invalid_argument; } #endif @@ -3647,7 +3647,7 @@ set_num_option( } if (curwin->w_p_nuw > 20) { - errmsg = e_invarg; + errmsg = e_invalid_argument; curwin->w_p_nuw = 20; } curwin->w_nrwidth_line_count = 0; // trigger a redraw @@ -3759,12 +3759,12 @@ set_num_option( } else if (p_hi > 10000) { - errmsg = e_invarg; + errmsg = e_invalid_argument; p_hi = 10000; } if (p_re < 0 || p_re > 2) { - errmsg = e_invarg; + errmsg = e_invalid_argument; p_re = 0; } if (p_report < 0) |