From 91e93cb7c4f8a928044347b67d260f139327029c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 3 Nov 2021 21:04:57 +0100 Subject: [PATCH] Terminal: handle cursor-color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I73071880c84c713ee3efec40f6ac824364157b83 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4685 Reviewed-by: Jérôme Duval Tested-by: Commit checker robot --- src/apps/terminal/TermParse.cpp | 2 ++ src/apps/terminal/TermView.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/apps/terminal/TermParse.cpp b/src/apps/terminal/TermParse.cpp index d925ade1fc..be8f3c35f5 100644 --- a/src/apps/terminal/TermParse.cpp +++ b/src/apps/terminal/TermParse.cpp @@ -1567,6 +1567,7 @@ TermParse::_ProcessOperatingSystemControls(uchar* params) // set dynamic colors (10 - 19) case 10: // text foreground case 11: // text background + case 12: // cursor back { int32 offset = mode - 10; int32 count = 0; @@ -1591,6 +1592,7 @@ TermParse::_ProcessOperatingSystemControls(uchar* params) // reset dynamic colors (10 - 19) case 110: // text foreground case 111: // text background + case 112: // cursor back { indexes[0] = mode; fBuffer->ResetColors(indexes, 1, true); diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index bedf49da9b..630fd44011 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -698,6 +698,9 @@ TermView::SetTermColor(uint index, rgb_color color, bool dynamic) fTextBackColor = color; SetLowColor(fTextBackColor); break; + case 12: + fCursorBackColor = color; + break; case 110: fTextForeColor = PrefHandler::Default()->getRGB( PREF_TEXT_FORE_COLOR); @@ -707,6 +710,10 @@ TermView::SetTermColor(uint index, rgb_color color, bool dynamic) PREF_TEXT_BACK_COLOR); SetLowColor(fTextBackColor); break; + case 112: + fCursorBackColor = PrefHandler::Default()->getRGB( + PREF_CURSOR_BACK_COLOR); + break; default: break; }