diff src/libvterm/src/state.c @ 12076:ca4931a20f8c v8.0.0918

patch 8.0.0918: cannot get terminal window cursor shape or attributes commit https://github.com/vim/vim/commit/3cd43ccccb03b2e68df9c8a344a87e51c007c656 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 12 19:51:41 2017 +0200 patch 8.0.0918: cannot get terminal window cursor shape or attributes Problem: Cannot get terminal window cursor shape or attributes. Solution: Support cursor shape, attributes and color.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Aug 2017 20:00:05 +0200
parents 4dfebc1b2674
children db99bd23c87f
line wrap: on
line diff
--- a/src/libvterm/src/state.c
+++ b/src/libvterm/src/state.c
@@ -1504,6 +1504,10 @@ static int on_osc(const char *command, s
     settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2);
     return 1;
   }
+  else if(strneq(command, "12;", 3)) {
+    settermprop_string(state, VTERM_PROP_CURSORCOLOR, command + 3, cmdlen - 3);
+    return 1;
+  }
   else if(state->fallbacks && state->fallbacks->osc)
     if((*state->fallbacks->osc)(command, cmdlen, state->fbdata))
       return 1;
@@ -1819,6 +1823,7 @@ int vterm_state_set_termprop(VTermState 
   switch(prop) {
   case VTERM_PROP_TITLE:
   case VTERM_PROP_ICONNAME:
+  case VTERM_PROP_CURSORCOLOR:
     /* we don't store these, just transparently pass through */
     return 1;
   case VTERM_PROP_CURSORVISIBLE: