url-mode: make the end coordinate *inclusive*

This commit is contained in:
Daniel Eklöf 2021-02-06 11:45:58 +01:00
parent d6ea2a4bdc
commit a578faf494
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -269,6 +269,11 @@ auto_detected(struct terminal *term, enum url_action action)
bool done = false;
struct coord end = {c, r};
if (--end.col < 0) {
end.row--;
end.col = term->cols - 1;
}
do {
switch (url[len - 1]) {
case L'.': case L',': case L':': case L';': case L'?':