1
0
forked from aniani/vim

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

@@ -4655,14 +4655,14 @@ get_encoded_char_adv(char_u **p)
/*
* Handle setting 'listchars' or 'fillchars'.
* "val" points to either the global or the window-local value.
* "value" points to either the global or the window-local value.
* "opt_lcs" is TRUE for "listchars" and FALSE for "fillchars".
* When "apply" is FALSE do not store the flags, only check for errors.
* Assume monocell characters.
* Returns error message, NULL if it's OK.
*/
static char *
set_chars_option(win_T *wp, char_u *val, int opt_lcs, int apply)
set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply)
{
int round, i, len, len2, entries;
char_u *p, *s;
@@ -4672,7 +4672,6 @@ set_chars_option(win_T *wp, char_u *val, int opt_lcs, int apply)
int multispace_len = 0; // Length of lcs-multispace string
int lead_multispace_len = 0; // Length of lcs-leadmultispace string
int is_listchars = opt_lcs;
char_u *value = val;
struct charstab
{