summaryrefslogtreecommitdiff
path: root/src/selection.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 14:10:31 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 14:10:31 +0300
commit7633ab2c60b40bd5aa67ef391b2a0d149685742f (patch)
tree37d4f89722605a177715f400eb103382ff08e2c3 /src/selection.c
parent274abc013e4b914b005191a7f74eaf2961a1e59e (diff)
Optimize screen scrolling, SIMD wrap padding, and reflow loops
- Batch full-screen scroll rotations, eliminating row-by-row scroll loops - Use block memmove for sub-region scrolling, eliminating heap/stack row swaps - Vectorize CELL_WRAP_PAD flag setting with AVX2/SSE2/NEON in screen.h - Replace scalar tab-stop loops with 64-bit word stamping - Optimize active row backwards scan in resize and erase mode 2
Diffstat (limited to 'src/selection.c')
-rw-r--r--src/selection.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/selection.c b/src/selection.c
index 0eda34f..b05a43c 100644
--- a/src/selection.c
+++ b/src/selection.c
@@ -187,8 +187,7 @@ static const struct cell *line_seg_cells(const struct lines *L, uint64_t id, int
if (got < L->cols) {
fill_cells(buf + got, L->cols - got, TERM_COLOR_FG, TERM_COLOR_BG);
if (wrapped)
- for (int x = got; x < L->cols; x++)
- buf[x].flags |= CELL_WRAP_PAD;
+ set_cells_wrap_pad(buf + got, L->cols - got);
}
if (out_wrapped)
*out_wrapped = wrapped;
@@ -678,8 +677,7 @@ static char *range_text_inner(const struct term *t,
if (got < t->cols) {
fill_cells(row_buf + got, t->cols - got, TERM_COLOR_FG, TERM_COLOR_BG);
if (row_wrapped)
- for (int x = got; x < t->cols; x++)
- row_buf[x].flags |= CELL_WRAP_PAD;
+ set_cells_wrap_pad(row_buf + got, t->cols - got);
}
cells = row_buf;
}