Skip to content

Instantly share code, notes, and snippets.

@h-east
Created July 20, 2015 11:49
Show Gist options
  • Save h-east/8c6b1bff23f5216c3f17 to your computer and use it in GitHub Desktop.
Save h-east/8c6b1bff23f5216c3f17 to your computer and use it in GitHub Desktop.
diff --git a/src/main.c b/src/main.c
--- a/src/main.c
+++ b/src/main.c
@@ -841,7 +841,6 @@
# if defined(FEAT_MBYTE)
may_req_ambiguous_char_width();
# endif
- may_req_bg_color();
#endif
#ifdef FEAT_MOUSE
diff --git a/src/term.c b/src/term.c
--- a/src/term.c
+++ b/src/term.c
@@ -4391,6 +4391,12 @@
need_gather = TRUE;
req_codes_from_term();
}
+
+ if (!option_was_set((char_u *)"bg"))
+ {
+ need_gather = TRUE;
+ may_req_bg_color();
+ }
}
# ifdef FEAT_EVAL
set_vim_var_string(VV_TERMRESPONSE, tp, i + 1);
@@ -5700,11 +5706,11 @@
int i;
int len = 0;
-#ifdef FEAT_GUI
- if (gui.in_use)
- termleader[len++] = CSI; /* the GUI codes are not in termcodes[] */
-#endif
+ termleader[len++] = CSI; /* the GUI codes are not in termcodes[] */
#ifdef FEAT_TERMRESPONSE
+ if (rbg_status == RBG_SENT)
+ termleader[len++] = OSC; /* the background color report starts with
+ OSC in 8-bit mode */
if (check_for_codes)
termleader[len++] = DCS; /* the termcode response starts with DCS
in 8-bit mode */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment