Last active
August 29, 2015 14:24
-
-
Save saitoha/fb1c38678650ef8744dc to your computer and use it in GitHub Desktop.
Fix for XTerm 8bit mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -r 758fe8fd4bae src/main.c | |
| --- a/src/main.c Sun Jul 19 14:42:23 2015 +0200 | |
| +++ b/src/main.c Mon Jul 20 19:52:53 2015 +0900 | |
| @@ -841,7 +841,6 @@ | |
| # if defined(FEAT_MBYTE) | |
| may_req_ambiguous_char_width(); | |
| # endif | |
| - may_req_bg_color(); | |
| #endif | |
| #ifdef FEAT_MOUSE | |
| diff -r 758fe8fd4bae src/term.c | |
| --- a/src/term.c Sun Jul 19 14:42:23 2015 +0200 | |
| +++ b/src/term.c Mon Jul 20 19:52:53 2015 +0900 | |
| @@ -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,14 +5706,14 @@ | |
| 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 (check_for_codes) | |
| termleader[len++] = DCS; /* the termcode response starts with DCS | |
| in 8-bit mode */ | |
| + if (rbg_status == RBG_SENT) | |
| + termleader[len++] = OSC; /* the background color report starts with | |
| + OSC in 8-bit mode */ | |
| #endif | |
| termleader[len] = NUL; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment