aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-03 15:31:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-03 15:31:41 +0000
commit159bfddb87040b5d1f3452db1e23015bdf551831 (patch)
treeb250c735f7eb3592ecc4ba66090e23363663cd0f
parentMerge branch 'initial-tiocswinsz' (diff)
selection: fix typo when extending selection to cover double-width character
-rw-r--r--selection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index 44b23860..ae6758f4 100644
--- a/selection.c
+++ b/selection.c
@@ -458,7 +458,7 @@ selection_update(struct terminal *term, int col, int row)
if (wcwidth(row_end->cells[new_end.col - 1].wc) > 1)
new_end.col--;
if (new_start.col + 1 < term->cols)
- if (wcwidth(row_end->cells[new_start.col].wc) > 1)
+ if (wcwidth(row_start->cells[new_start.col].wc) > 1)
new_start.col++;
}