mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-10 04:27:45 -05:00
render: underlines: minor perf-tweak: early break out
When looking up the extender underline range, break out early if we see that there can't possibly be any ranges matching the current column.
This commit is contained in:
parent
0759caec6e
commit
08138e9546
1 changed files with 3 additions and 0 deletions
3
render.c
3
render.c
|
|
@ -971,6 +971,9 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_region32_t *damag
|
|||
for (int i = 0; i < row->extra->curly_ranges.count; i++) {
|
||||
const struct row_range *range = &row->extra->curly_ranges.v[i];
|
||||
|
||||
if (range->start > col)
|
||||
break;
|
||||
|
||||
if (range->start <= col && col <= range->end) {
|
||||
switch (range->curly.color_src) {
|
||||
case COLOR_BASE256:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue