aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--terminal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index d9834f9e..3e2eb97f 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3047,6 +3047,11 @@ term_osc8_close(struct terminal *term)
.row = grid_row_absolute(term->grid, term->grid->cursor.point.row),
};
+ if (start.row == end.row && start.col == end.col) {
+ /* Zero-length URL, e.g: \E]8;;http://foo\E\\\E]8;;\E\\ */
+ goto done;
+ }
+
/* end is *inclusive */
if (--end.col < 0) {
end.row--;