summaryrefslogtreecommitdiffstats
path: root/src/optiondefs.h
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-03-03 12:26:15 +0000
committerBram Moolenaar <Bram@vim.org>2023-03-03 12:26:15 +0000
commitc727b19e9f1df36e44321d933334c7b4961daa54 (patch)
tree75926980b51849aa2571aed033e81541a8c0c939 /src/optiondefs.h
parent194555c001f2b8576483ef34511450b6e9b5e3fd (diff)
patch 9.0.1374: function for setting options not used consistentlyv9.0.1374
Problem: Function for setting options not used consistently. Solution: Use a function for 'encoding' and terminal options. (Yegappan Lakshmanan, closes #12099)
Diffstat (limited to 'src/optiondefs.h')
-rw-r--r--src/optiondefs.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 89eaf7ae99..668e62f577 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -862,7 +862,7 @@ static struct vimoption options[] =
{(char_u *)TRUE, (char_u *)0L}
SCTX_INIT},
{"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
- (char_u *)&p_enc, PV_NONE, NULL,
+ (char_u *)&p_enc, PV_NONE, did_set_encoding,
{(char_u *)ENC_DFLT, (char_u *)0L}
SCTX_INIT},
{"endoffile", "eof", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
@@ -914,7 +914,7 @@ static struct vimoption options[] =
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF
|P_NO_MKRC,
- (char_u *)&p_fenc, PV_FENC, NULL,
+ (char_u *)&p_fenc, PV_FENC, did_set_encoding,
{(char_u *)"", (char_u *)0L}
SCTX_INIT},
{"fileencodings","fencs", P_STRING|P_VI_DEF|P_ONECOMMA,
@@ -1606,7 +1606,7 @@ static struct vimoption options[] =
#endif
SCTX_INIT},
{"makeencoding","menc", P_STRING|P_VI_DEF,
- (char_u *)&p_menc, PV_MENC, NULL,
+ (char_u *)&p_menc, PV_MENC, did_set_encoding,
{(char_u *)"", (char_u *)0L}
SCTX_INIT},
{"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
@@ -2516,7 +2516,7 @@ static struct vimoption options[] =
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR,
- (char_u *)&p_tenc, PV_NONE, NULL,
+ (char_u *)&p_tenc, PV_NONE, did_set_encoding,
{(char_u *)"", (char_u *)0L}
SCTX_INIT},
{"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
@@ -2901,7 +2901,7 @@ static struct vimoption options[] =
// terminal output codes
#define p_term(sss, vvv) \
{sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \
- (char_u *)&vvv, PV_NONE, NULL, \
+ (char_u *)&vvv, PV_NONE, did_set_term_option, \
{(char_u *)"", (char_u *)0L} SCTX_INIT},
p_term("t_AB", T_CAB)