Add strikethrough support

This commit is contained in:
2025-12-30 10:55:32 +00:00
parent 235eafb01c
commit 26e0b06e24
40 changed files with 1197 additions and 1184 deletions

View File

@@ -123,6 +123,7 @@ void render() {
uint32_t current_ul_color = 0;
bool current_italic = false;
bool current_bold = false;
bool current_strikethrough = false;
bool current_underline = false;
std::lock_guard<std::mutex> lock(screen_mutex);
std::string out;
@@ -218,6 +219,11 @@ void render() {
out += bold ? "\x1b[1m" : "\x1b[22m";
current_bold = bold;
}
bool strikethrough = (new_cell.flags & CF_STRIKETHROUGH) != 0;
if (strikethrough != current_strikethrough) {
out += strikethrough ? "\x1b[9m" : "\x1b[29m";
current_strikethrough = strikethrough;
}
bool underline = (new_cell.flags & CF_UNDERLINE) != 0;
if (underline) {
if (new_cell.ul_color != current_ul_color) {