Ncurses: display status line in terminal title as well
This commit is contained in:
parent
d29f44e493
commit
ca69981cc6
|
@ -221,6 +221,18 @@ void NCursesUI::draw(const DisplayBuffer& display_buffer,
|
||||||
move((int)m_dimensions.line, (int)col);
|
move((int)m_dimensions.line, (int)col);
|
||||||
draw_line(mode_line, col);
|
draw_line(mode_line, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* tsl = tigetstr((char*)"tsl");
|
||||||
|
const char* fsl = tigetstr((char*)"fsl");
|
||||||
|
if (tsl != 0 and (ptrdiff_t)tsl != -1 and fsl != 0 and (ptrdiff_t)fsl != -1)
|
||||||
|
{
|
||||||
|
String title;
|
||||||
|
for (auto& atom : mode_line)
|
||||||
|
title += atom.content.content();
|
||||||
|
title += " - Kakoune";
|
||||||
|
printf("%s%s%s", tsl, title.c_str(), fsl);
|
||||||
|
}
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user