François Ingelrest wrote:

> On 1 May 2017 at 15:35, Bram Moolenaar <[email protected]> wrote:
> > Strange.  Do you have t_RB set?  If so, does it help to make it empty?
> 
> Yes it seems to be automatically set (at least not set in my .vimrc)
> to <1b>]11;?<07>. If I make it empty in my .vimrc, termguicolors works
> as expected.

OK, well then maybe we should implement this comment:
        {/* TODO: don't set option when already the right value */

Try this patch:

--- /home/mool/vim/git/vim80/src/term.c 2017-04-20 19:44:05.409983042 +0200
+++ term.c      2017-05-01 17:29:12.709850330 +0200
@@ -4385,14 +4385,20 @@
                        if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
                            && tp[j + 11] == '/' && tp[j + 16] == '/'
                            && !option_was_set((char_u *)"bg"))
-                       {/* TODO: don't set option when already the right value 
*/
+                       {
+                           char *newval = (3 * '6' < tp[j+7] + tp[j+12]
+                                               + tp[j+17]) ? "light" : "dark";
+
                            LOG_TR("Received RBG");
                            rbg_status = RBG_GOT;
-                           set_option_value((char_u *)"bg", 0L, (char_u *)(
-                                   (3 * '6' < tp[j+7] + tp[j+12] + tp[j+17])
-                                   ? "light" : "dark"), 0);
-                           reset_option_was_set((char_u *)"bg");
-                           redraw_asap(CLEAR);
+                           if (STRCMP(p_bg, newval) != 0)
+                           {
+                               /* value differs, apply it */
+                               set_option_value((char_u *)"bg", 0L,
+                                                         (char_u *)newval, 0);
+                               reset_option_was_set((char_u *)"bg");
+                               redraw_asap(CLEAR);
+                           }
                        }
 
                        /* got finished code: consume it */

-- 
Dreams are free, but there's a small charge for alterations.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui