selection: fix typo when extending selection to cover double-width character

This commit is contained in:
Daniel Eklöf 2020-06-03 17:31:41 +02:00
parent f1c8ccddde
commit 159bfddb87
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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++;
}