diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-12-08 09:35:30 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-02-06 11:12:56 +0000 |
| commit | f8e875a7cddaac91818b98993d17a96d09a5b4a5 (patch) | |
| tree | dc3e965b664c7e713919056131be98b2310cc613 | |
| parent | Merge branch 'modifiers' (diff) | |
term: move row->prompt_marker into new struct, row->shell_integration
| -rw-r--r-- | grid.c | 10 | ||||
| -rw-r--r-- | input.c | 4 | ||||
| -rw-r--r-- | osc.c | 2 | ||||
| -rw-r--r-- | terminal.c | 2 | ||||
| -rw-r--r-- | terminal.h | 5 |
5 files changed, 12 insertions, 11 deletions
@@ -231,7 +231,7 @@ grid_snapshot(const struct grid *grid) clone_row->cells = xmalloc(grid->num_cols * sizeof(clone_row->cells[0])); clone_row->linebreak = row->linebreak; clone_row->dirty = row->dirty; - clone_row->prompt_marker = row->prompt_marker; + clone_row->shell_integration = row->shell_integration; for (int c = 0; c < grid->num_cols; c++) clone_row->cells[c] = row->cells[c]; @@ -366,7 +366,7 @@ grid_row_alloc(int cols, bool initialize) row->dirty = false; row->linebreak = false; row->extra = NULL; - row->prompt_marker = false; + row->shell_integration.prompt_marker = false; if (initialize) { row->cells = xcalloc(cols, sizeof(row->cells[0])); @@ -425,7 +425,7 @@ grid_resize_without_reflow( new_row->dirty = old_row->dirty; new_row->linebreak = false; - new_row->prompt_marker = old_row->prompt_marker; + new_row->shell_integration = old_row->shell_integration; if (new_cols > old_cols) { /* Clear "new" columns */ @@ -587,7 +587,7 @@ _line_wrap(struct grid *old_grid, struct row **new_grid, struct row *row, /* Scrollback is full, need to reuse a row */ grid_row_reset_extra(new_row); new_row->linebreak = false; - new_row->prompt_marker = false; + new_row->shell_integration.prompt_marker = false; tll_foreach(old_grid->sixel_images, it) { if (it->item.pos.row == *row_idx) { @@ -920,7 +920,7 @@ grid_resize_and_reflow( xassert(from + amount <= old_cols); if (from == 0) - new_row->prompt_marker = old_row->prompt_marker; + new_row->shell_integration = old_row->shell_integration; memcpy( &new_row->cells[new_col_idx], &old_row->cells[from], @@ -377,7 +377,7 @@ execute_binding(struct seat *seat, struct terminal *term, const struct row *row = grid->rows[r_abs]; xassert(row != NULL); - if (!row->prompt_marker) + if (!row->shell_integration.prompt_marker) continue; grid->view = r_abs; @@ -409,7 +409,7 @@ execute_binding(struct seat *seat, struct terminal *term, const struct row *row = grid->rows[r_abs]; xassert(row != NULL); - if (!row->prompt_marker) { + if (!row->shell_integration.prompt_marker) { if (r_abs == grid->offset + term->rows - 1) { /* We’ve reached the bottom of the scrollback */ break; @@ -893,7 +893,7 @@ osc_dispatch(struct terminal *term) term->grid->cursor.point.row, term->grid->cursor.point.col); - term->grid->cur_row->prompt_marker = true; + term->grid->cur_row->shell_integration.prompt_marker = true; break; case 'B': @@ -1825,7 +1825,7 @@ erase_line(struct terminal *term, struct row *row) { erase_cell_range(term, row, 0, term->cols - 1); row->linebreak = false; - row->prompt_marker = false; + row->shell_integration.prompt_marker = false; } void @@ -121,8 +121,9 @@ struct row { bool dirty; bool linebreak; - /* Shell integration */ - bool prompt_marker; + struct { + bool prompt_marker; + } shell_integration; }; struct sixel { |
