From 663c43c139a4cc9405dde4d0d2e4d45eeac78e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 13 Feb 2021 14:16:53 +0100 Subject: [PATCH] term_osc8_close(): the URL *end* column is inclusive --- terminal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terminal.c b/terminal.c index 9051c566..efd260f1 100644 --- a/terminal.c +++ b/terminal.c @@ -3047,6 +3047,12 @@ term_osc8_close(struct terminal *term) .row = grid_row_absolute(term->grid, term->grid->cursor.point.row), }; + /* end is *inclusive */ + if (--end.col < 0) { + end.row--; + end.col = term->cols - 1; + } + int r = start.row; int start_col = start.col; do {