mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 20:44:32 +02:00
Fix marking of text not working on lines that contain zero cells
Zero cells are passed to the regex engine as spaces, so they must increment the match_pos counter. Fixes #3403
This commit is contained in:
@@ -736,8 +736,8 @@ apply_mark(Line *line, const attrs_type mark, index_type *cell_pos, unsigned int
|
||||
#define MARK { line->gpu_cells[x].attrs &= ATTRS_MASK_WITHOUT_MARK; line->gpu_cells[x].attrs |= mark; }
|
||||
index_type x = *cell_pos;
|
||||
MARK;
|
||||
(*match_pos)++;
|
||||
if (line->cpu_cells[x].ch) {
|
||||
(*match_pos)++;
|
||||
if (line->cpu_cells[x].ch == '\t') {
|
||||
unsigned num_cells_to_skip_for_tab = line->cpu_cells[x].cc_idx[0];
|
||||
while (num_cells_to_skip_for_tab && x + 1 < line->xnum && line->cpu_cells[x+1].ch == ' ') {
|
||||
|
||||
Reference in New Issue
Block a user