aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-10 18:22:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-10 18:22:02 +0000
commit75830ba016f597ac9ad7a09bc469e7023cec01b2 (patch)
tree2ec46ffe9509bfd7d081b26b48131a808774d329
parentosc: implement copy/paste to/from primary (diff)
selection: regression: last cell wasn't included in copied text
-rw-r--r--selection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index 1bd46ff4..45f970f2 100644
--- a/selection.c
+++ b/selection.c
@@ -73,7 +73,7 @@ extract_selection(const struct terminal *term)
*/
for (int col = start_col, empty_count = 0;
- col < (r == end->row ? end->col : term->cols);
+ col <= (r == end->row ? end->col : term->cols - 1);
col++)
{
const struct cell *cell = &row->cells[col];