aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/optionstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r--src/nvim/optionstr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 1aab9d4344..9ca8615467 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -663,12 +663,17 @@ int expand_set_ambiwidth(optexpand_T *args, int *numMatches, char ***matches)
}
/// The 'background' option is changed.
-const char *did_set_background(optset_T *args FUNC_ATTR_UNUSED)
+const char *did_set_background(optset_T *args)
{
if (check_opt_strings(p_bg, p_bg_values, false) != OK) {
return e_invarg;
}
+ if (args->os_oldval.string.data[0] == *p_bg) {
+ // Value was not changed
+ return NULL;
+ }
+
int dark = (*p_bg == 'd');
init_highlight(false, false);