aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-06 10:45:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-07 15:33:33 +0000
commita578faf494981fdd042dd49e298eeeafdc646499 (patch)
tree1e4a1be369a08d3ce8d92dbf899f55428079c130
parentinput: mouse events on jump label surfaces do nothing (diff)
url-mode: make the end coordinate *inclusive*
-rw-r--r--url-mode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/url-mode.c b/url-mode.c
index f38026b4..4feea2df 100644
--- a/url-mode.c
+++ b/url-mode.c
@@ -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'?':