aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-12-26 13:51:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-12-26 13:51:26 +0000
commit3f10ee87b1ab6f280fae25dfe85c11df34125602 (patch)
tree2298cef3814a28786920999caf9ff2270bf10837 /terminal.c
parenttest: config: fix format specifier: uint32_t needs %u, not %hu (diff)
term: print: erase existing OSC-8 URI
If we have an “active” OSC-8 URI, term_print() would correctly replace an existing URI with the new one. But, if we don’t have an active URI, an existing URI was not erased. This can be reproduced with e.g echo -e '\e]8;;http://foo.bar\e\\foobar\e]8;;\e\\\b\b\b\b\b😀\n'
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index fd8ff4ae..f8612c46 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3262,7 +3262,8 @@ term_print(struct terminal *term, wchar_t wc, int width)
case OSC8_UNDERLINE_URL_MODE:
break;
}
- }
+ } else if (row->extra != NULL)
+ grid_row_uri_range_erase(row, col, col + width - 1);
/* Advance cursor the 'additional' columns while dirty:ing the cells */
for (int i = 1; i < width && col < term->cols - 1; i++) {