summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2023-06-25 15:53:07 +0000
committernicm <nicm>2023-06-25 15:53:07 +0000
commit9e14c1f88de6bf812e0eaae0c05b782702e687f1 (patch)
tree61eb4b71e0a029f8afb92dcc7eab4914cf6fc578 /input.c
parent645bf8b3ab9606bff1d94842ea14556c9f1d620a (diff)
SGR 0 should not end hyperlink, reported by Lucas Trzesniewski.
Diffstat (limited to 'input.c')
-rw-r--r--input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/input.c b/input.c
index 5a14104b..b2d28386 100644
--- a/input.c
+++ b/input.c
@@ -2065,7 +2065,7 @@ static void
input_csi_dispatch_sgr(struct input_ctx *ictx)
{
struct grid_cell *gc = &ictx->cell.cell;
- u_int i;
+ u_int i, link;
int n;
if (ictx->param_list_len == 0) {
@@ -2097,7 +2097,9 @@ input_csi_dispatch_sgr(struct input_ctx *ictx)
switch (n) {
case 0:
+ link = gc->link;
memcpy(gc, &grid_default_cell, sizeof *gc);
+ gc->link = link;
break;
case 1:
gc->attr |= GRID_ATTR_BRIGHT;