Fix last character of URL not being detected if it is the only character on a new line

Fixes #3088
This commit is contained in:
Kovid Goyal 2020-11-11 14:00:00 +05:30
parent a40059729e
commit a74679dd95
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 1 deletions

View file

@ -41,6 +41,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Fix the send_text action not working in URL handlers (:iss:`3081`)
- Fix last character of URL not being detected if it is the only character on a
new line (:iss:`3088`)
0.19.1 [2020-10-06]
-------------------

View file

@ -275,7 +275,7 @@ extend_url(Screen *screen, Line *line, index_type *x, index_type *y, char_type s
// we deliberately allow non-continued lines as some programs, like
// mutt split URLs with newlines at line boundaries
index_type new_x = line_url_end_at(line, 0, false, sentinel, next_line_starts_with_url_chars);
if (!new_x) break;
if (!new_x && !line_startswith_url_chars(line)) break;
*y += 1; *x = new_x;
}
}