diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-02-10 07:57:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-02-10 12:19:50 +0000 |
| commit | 3d66db63ccb1baab2d78e6d104a9c15d3f6684d1 (patch) | |
| tree | 0f29c885bb1d1fd0d54ab7276c8b8726d0fd5d12 /render.c | |
| parent | url-mode: regex: don't try to NULL-terminate an invalid vline (diff) | |
grid: refactor reflow
We've been trying to performance optimize reflow by "chunking" cells;
try to gather as many as possible, and memcpy a chunk at once.
The problem is that a) this quickly becomes very complex, and b) is
very hard to get right for multi-column characters, especially when we
need to truncate long ones due to the window being too small.
Refactor, and once again walk and copy all cells one by one. This is
slower, but at least it's correct.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4190,7 +4190,7 @@ delayed_reflow_of_normal_grid(struct terminal *term) /* Reflow the original (since before the resize was started) grid, * to the *current* dimensions */ grid_resize_and_reflow( - term->interactive_resizing.grid, + term->interactive_resizing.grid, term, term->interactive_resizing.new_rows, term->normal.num_cols, term->interactive_resizing.old_screen_rows, term->rows, term->selection.coords.end.row >= 0 ? ALEN(tracking_points) : 0, @@ -4409,7 +4409,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts) } /* Don't shrink grid too much */ - const int min_cols = 7; /* See OSC-66 */ + const int min_cols = 2; const int min_rows = 1; /* Minimum window size (must be divisible by the scaling factor)*/ @@ -4691,7 +4691,7 @@ render_resize(struct terminal *term, int width, int height, uint8_t opts) }; grid_resize_and_reflow( - &term->normal, new_normal_grid_rows, new_cols, old_normal_rows, new_rows, + &term->normal, term, new_normal_grid_rows, new_cols, old_normal_rows, new_rows, term->selection.coords.end.row >= 0 ? ALEN(tracking_points) : 0, tracking_points); } |
