Terminal: handle cursor-color
Change-Id: I73071880c84c713ee3efec40f6ac824364157b83 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4685 Reviewed-by: Jérôme Duval <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -1567,6 +1567,7 @@ TermParse::_ProcessOperatingSystemControls(uchar* params)
|
|||||||
// set dynamic colors (10 - 19)
|
// set dynamic colors (10 - 19)
|
||||||
case 10: // text foreground
|
case 10: // text foreground
|
||||||
case 11: // text background
|
case 11: // text background
|
||||||
|
case 12: // cursor back
|
||||||
{
|
{
|
||||||
int32 offset = mode - 10;
|
int32 offset = mode - 10;
|
||||||
int32 count = 0;
|
int32 count = 0;
|
||||||
@@ -1591,6 +1592,7 @@ TermParse::_ProcessOperatingSystemControls(uchar* params)
|
|||||||
// reset dynamic colors (10 - 19)
|
// reset dynamic colors (10 - 19)
|
||||||
case 110: // text foreground
|
case 110: // text foreground
|
||||||
case 111: // text background
|
case 111: // text background
|
||||||
|
case 112: // cursor back
|
||||||
{
|
{
|
||||||
indexes[0] = mode;
|
indexes[0] = mode;
|
||||||
fBuffer->ResetColors(indexes, 1, true);
|
fBuffer->ResetColors(indexes, 1, true);
|
||||||
|
|||||||
@@ -698,6 +698,9 @@ TermView::SetTermColor(uint index, rgb_color color, bool dynamic)
|
|||||||
fTextBackColor = color;
|
fTextBackColor = color;
|
||||||
SetLowColor(fTextBackColor);
|
SetLowColor(fTextBackColor);
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
fCursorBackColor = color;
|
||||||
|
break;
|
||||||
case 110:
|
case 110:
|
||||||
fTextForeColor = PrefHandler::Default()->getRGB(
|
fTextForeColor = PrefHandler::Default()->getRGB(
|
||||||
PREF_TEXT_FORE_COLOR);
|
PREF_TEXT_FORE_COLOR);
|
||||||
@@ -707,6 +710,10 @@ TermView::SetTermColor(uint index, rgb_color color, bool dynamic)
|
|||||||
PREF_TEXT_BACK_COLOR);
|
PREF_TEXT_BACK_COLOR);
|
||||||
SetLowColor(fTextBackColor);
|
SetLowColor(fTextBackColor);
|
||||||
break;
|
break;
|
||||||
|
case 112:
|
||||||
|
fCursorBackColor = PrefHandler::Default()->getRGB(
|
||||||
|
PREF_CURSOR_BACK_COLOR);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user