Allow clients to query if the terminal emulator support styled underlines

This commit is contained in:
Kovid Goyal
2017-02-10 16:00:51 +05:30
parent 924172f1ac
commit edab1aebaa
4 changed files with 25 additions and 0 deletions

View File

@@ -76,5 +76,8 @@
#define BRACKETED_PASTE_START "\033[200~"
#define BRACKETED_PASTE_END "\033[201~"
// Styled underlines
#define STYLED_UNDERLINES (2016 << 5)
// Extended keyboard protocol
#define EXTENDED_KEYBOARD (2017 << 5)

View File

@@ -923,6 +923,8 @@ report_mode_status(Screen *self, unsigned int which, bool private) {
KNOWN_MODE(EXTENDED_KEYBOARD);
KNOWN_MODE(FOCUS_TRACKING);
#undef KNOWN_MODE
case STYLED_UNDERLINES:
ans = 3; break;
}
if (snprintf(buf, sizeof(buf) - 1, "\x1b[%s%u;%u$y", (private ? "?" : ""), which, ans)) callback("write_to_child", self, buf, 0);
}