Add an InlineInformation face distinct from Information

main
Loric Brevet 2023-09-28 15:05:46 +02:00
parent 23afed056b
commit a2fd401cfa
No known key found for this signature in database
GPG Key ID: 6AB3DBD46F8FB159
3 changed files with 6 additions and 1 deletions

View File

@ -107,6 +107,9 @@ the user interface:
*Information*::
Face for windows and messages displaying other information.
*InlineInformation*::
Face for windows and messages displaying inline information.
*Error*::
Face for errors reported by Kakoune in the status line.

View File

@ -278,7 +278,8 @@ void Client::redraw_ifn()
if (m_ui_pending & InfoShow and m_info.ui_anchor)
m_ui->info_show(m_info.title, m_info.content, *m_info.ui_anchor,
faces["Information"], m_info.style);
faces[(is_inline(m_info.style) || m_info.style == InfoStyle::MenuDoc)
? "InlineInformation" : "Information"], m_info.style);
if (m_ui_pending & InfoHide)
m_ui->info_hide();

View File

@ -191,6 +191,7 @@ FaceRegistry::FaceRegistry()
{ "MenuBackground", {Face{ Color::Blue, Color::White }} },
{ "MenuInfo", {Face{ Color::Cyan, Color::Default }} },
{ "Information", {Face{ Color::Black, Color::Yellow }} },
{ "InlineInformation", {Face{}, "Information"} },
{ "Error", {Face{ Color::Black, Color::Red }} },
{ "DiagnosticError", {Face{ Color::Red, Color::Default }} },
{ "DiagnosticWarning", {Face{ Color::Yellow, Color::Default }} },