diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-07-30 05:29:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-07-30 05:29:50 +0000 |
| commit | 38b3424a1148779a659ea26077965518118c8e9f (patch) | |
| tree | a749b485843518ab0b7278728deb1a92ad40f6b3 /selection.c | |
| parent | selection: fixed segfault when quote is on newline (diff) | |
selection: find-quote-right: assert next-row > 0
Diffstat (limited to 'selection.c')
| -rw-r--r-- | selection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/selection.c b/selection.c index fb8c560a..818a6834 100644 --- a/selection.c +++ b/selection.c @@ -598,6 +598,10 @@ selection_find_quote_right(struct terminal *term, struct coord *pos, char32_t qu wc = row->cells[next_col].wc; if (wc == quote_char) { if (next_col == 0) { + /* Selection coordinates are view-relative, and it + isn't possible to have a right-side quote with + next-col == 0 AND next_row == 0 */ + xassert(next_row > 0); pos->row = next_row - 1; pos->col = term->cols - 1; } else { |
