0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1374: function for setting options not used consistently

Problem:    Function for setting options not used consistently.
Solution:   Use a function for 'encoding' and terminal options. (Yegappan
            Lakshmanan, closes #12099)
This commit is contained in:
Yegappan Lakshmanan
2023-03-03 12:26:15 +00:00
committed by Bram Moolenaar
parent 194555c001
commit c727b19e9f
6 changed files with 152 additions and 135 deletions

View File

@@ -4797,8 +4797,11 @@ typedef struct {
*/
typedef struct
{
// Pointer to the option variable. The variable can be a long (numeric
// option), an int (boolean option) or a char pointer (string option).
char_u *os_varp;
int os_idx;
int os_flags;
char_u *os_varp; // pointer to the option variable
// old value of the option (can be a string, number or a boolean)
union
@@ -4831,6 +4834,11 @@ typedef struct
// option and need to be restored because of a failure.
int os_restore_chartab;
#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
// Used by the 't_xxx' terminal options on MS-Windows.
int os_did_swaptcap;
#endif
// If the value specified for an option is not valid and the error message
// is parameterized, then the "os_errbuf" buffer is used to store the error
// message (when it is not NULL).