Skip to content
Myr

render: remove check that skips rendering lines if we’re outside the buffer

Before adoption: this commit came in with the history the project adopted, so no landing records it.

First, the logic doesn’t always work; the user may have configured a smaller line-height, than that of the font. The check would always trigger, and the last element always skipped. Second, we’re already setting a clip region on the buffer, so we’re already protected against writing outside the pixman buffer. Thus, it makes sense to render the (typically last) line, even if it may get truncated. Closes #234

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 9bd727e · Browse files · 2 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−6 removed

  • other:+6 added−6 removed

2 files+6 added−6 removed

modified:CHANGELOG.md+6 added
33 unmodified lines
34### Changed35### Deprecated36### Removed37### Fixed3839* Last line sometimes not being rendered ([#234][234]).4041[234]: https://codeberg.org/dnkl/fuzzel/issues/234424344### Security45### Contributors4647## 1.9.1
495 unmodified lines
modified:render.c-6 removed
621 unmodified lines
622623 bool render_icons = mtx_trylock(render->icon_lock) == thrd_success;624625 for (size_t i = 0; i < match_count; i++) {626 if (y + font->descent > buf->height - y_margin - border_size) {627 /* Window too small - happens if the compositor doesn't628 * respect our requested size */629 break;630 }631626 const struct match *match = matches_get(matches, i);627628 if (i == selected) {629 /* If currently selected item has a scalable icon, and if
228 unmodified lines