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)
diff --git a/src/screen.c b/src/screen.c
index 0dfb135..6d48ad7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4655,14 +4655,14 @@
/*
* 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 @@
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
{