mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-24 03:56:32 +03:00
NCurses: use the general face merging function to handle default face
Merge attributes as well, and reuse an existing function instead of reimplementing the same logic again. Closes #1684
This commit is contained in:
parent
1f02a1f7e2
commit
b298e01390
@ -198,10 +198,7 @@ void NCursesUI::set_face(NCursesWin* window, Face face, const Face& default_face
|
||||
if (m_active_pair != -1)
|
||||
wattroff(window, COLOR_PAIR(m_active_pair));
|
||||
|
||||
if (face.fg == Color::Default)
|
||||
face.fg = default_face.fg;
|
||||
if (face.bg == Color::Default)
|
||||
face.bg = default_face.bg;
|
||||
face = merge_faces(default_face, face);
|
||||
|
||||
if (face.fg != Color::Default or face.bg != Color::Default)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user