1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 17:31:44 +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:
Maxime Coste 2017-11-12 23:02:40 +08:00
parent 1f02a1f7e2
commit b298e01390

View File

@ -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)
{