Mercurial > vim
comparison src/libvterm/src/state.c @ 13318:5e47c4bdf3a6 v8.0.1533
patch 8.0.1533: libterm doesn't support requesting fg and bg color
commit https://github.com/vim/vim/commit/674e482d1346aa1afddab62675f3a7d7a00a4894
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 24 14:03:56 2018 +0100
patch 8.0.1533: libterm doesn't support requesting fg and bg color
Problem: Libterm doesn't support requesting fg and bg color.
Solution: Implement t_RF and t_RB.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 24 Feb 2018 14:15:06 +0100 |
parents | dc39ef257b60 |
children | a62b0bbc8834 |
comparison
equal
deleted
inserted
replaced
13317:64be34986f54 | 13318:5e47c4bdf3a6 |
---|---|
1502 settermprop_string(state, VTERM_PROP_ICONNAME, command + 2, cmdlen - 2); | 1502 settermprop_string(state, VTERM_PROP_ICONNAME, command + 2, cmdlen - 2); |
1503 return 1; | 1503 return 1; |
1504 } | 1504 } |
1505 else if(strneq(command, "2;", 2)) { | 1505 else if(strneq(command, "2;", 2)) { |
1506 settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2); | 1506 settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2); |
1507 return 1; | |
1508 } | |
1509 else if(strneq(command, "10;", 3)) { | |
1510 /* request foreground color: <Esc>]10;?<0x07> */ | |
1511 int red = state->default_fg.red; | |
1512 int blue = state->default_fg.blue; | |
1513 int green = state->default_fg.green; | |
1514 vterm_push_output_sprintf_ctrl(state->vt, C1_OSC, "10;rgb:%02x%02x/%02x%02x/%02x%02x\x07", red, red, green, green, blue, blue); | |
1515 return 1; | |
1516 } | |
1517 else if(strneq(command, "11;", 3)) { | |
1518 /* request background color: <Esc>]11;?<0x07> */ | |
1519 int red = state->default_bg.red; | |
1520 int blue = state->default_bg.blue; | |
1521 int green = state->default_bg.green; | |
1522 vterm_push_output_sprintf_ctrl(state->vt, C1_OSC, "11;rgb:%02x%02x/%02x%02x/%02x%02x\x07", red, red, green, green, blue, blue); | |
1507 return 1; | 1523 return 1; |
1508 } | 1524 } |
1509 else if(strneq(command, "12;", 3)) { | 1525 else if(strneq(command, "12;", 3)) { |
1510 settermprop_string(state, VTERM_PROP_CURSORCOLOR, command + 3, cmdlen - 3); | 1526 settermprop_string(state, VTERM_PROP_CURSORCOLOR, command + 3, cmdlen - 3); |
1511 return 1; | 1527 return 1; |