Patch 8.0.1533
Problem:    Libterm doesn't support requesting fg and bg color.
Solution:   Implement t_RF and t_RB.
Files:      src/libvterm/src/vterm_internal.h, src/libvterm/src/state.c,
            src/libvterm/src/vterm.c


*** ../vim-8.0.1532/src/libvterm/src/vterm_internal.h   2017-08-12 
21:15:30.717568729 +0200
--- src/libvterm/src/vterm_internal.h   2018-02-23 23:03:43.739779604 +0100
***************
*** 222,228 ****
    C1_SS3 = 0x8f,
    C1_DCS = 0x90,
    C1_CSI = 0x9b,
!   C1_ST  = 0x9c
  };
  
  void vterm_state_push_output_sprintf_CSI(VTermState *vts, const char *format, 
...);
--- 222,229 ----
    C1_SS3 = 0x8f,
    C1_DCS = 0x90,
    C1_CSI = 0x9b,
!   C1_ST  = 0x9c,
!   C1_OSC = 0x9d
  };
  
  void vterm_state_push_output_sprintf_CSI(VTermState *vts, const char *format, 
...);
*** ../vim-8.0.1532/src/libvterm/src/state.c    2018-02-04 14:49:54.019221594 
+0100
--- src/libvterm/src/state.c    2018-02-24 14:00:46.017694071 +0100
***************
*** 1506,1511 ****
--- 1506,1527 ----
      settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2);
      return 1;
    }
+   else if(strneq(command, "10;", 3)) {
+     /* request foreground color: <Esc>]10;?<0x07> */
+     int red = state->default_fg.red;
+     int blue = state->default_fg.blue;
+     int green = state->default_fg.green;
+     vterm_push_output_sprintf_ctrl(state->vt, C1_OSC, 
"10;rgb:%02x%02x/%02x%02x/%02x%02x\x07", red, red, green, green, blue, blue);
+     return 1;
+   }
+   else if(strneq(command, "11;", 3)) {
+     /* request background color: <Esc>]11;?<0x07> */
+     int red = state->default_bg.red;
+     int blue = state->default_bg.blue;
+     int green = state->default_bg.green;
+     vterm_push_output_sprintf_ctrl(state->vt, C1_OSC, 
"11;rgb:%02x%02x/%02x%02x/%02x%02x\x07", red, red, green, green, blue, blue);
+     return 1;
+   }
    else if(strneq(command, "12;", 3)) {
      settermprop_string(state, VTERM_PROP_CURSORCOLOR, command + 3, cmdlen - 
3);
      return 1;
*** ../vim-8.0.1532/src/libvterm/src/vterm.c    2017-09-21 22:46:43.746047974 
+0200
--- src/libvterm/src/vterm.c    2018-02-23 23:14:24.119713173 +0100
***************
*** 56,62 ****
    vt->strbuffer_cur = 0;
    vt->strbuffer = vterm_allocator_malloc(vt, vt->strbuffer_len);
  
!   vt->outbuffer_len = 64;
    vt->outbuffer_cur = 0;
    vt->outbuffer = vterm_allocator_malloc(vt, vt->outbuffer_len);
  
--- 56,62 ----
    vt->strbuffer_cur = 0;
    vt->strbuffer = vterm_allocator_malloc(vt, vt->strbuffer_len);
  
!   vt->outbuffer_len = 200;
    vt->outbuffer_cur = 0;
    vt->outbuffer = vterm_allocator_malloc(vt, vt->outbuffer_len);
  
*** ../vim-8.0.1532/src/version.c       2018-02-23 18:23:25.226809231 +0100
--- src/version.c       2018-02-24 14:03:06.568917366 +0100
***************
*** 780,781 ****
--- 780,783 ----
  {   /* Add new patch number below this line */
+ /**/
+     1533,
  /**/

-- 
Q: What kind of stuff do you do?
A: I collect hobbies.

 /// 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