Skip to content
Myr

refactor: call first_row_y() instead of re-implementing

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

authored by Mark Stosberg · committed by Daniel Eklöf · parent 8a9af50 · Browse files · 1 file+2 added−7 removed
This commit

State

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

Diff stats

1 file+2 added−7 removed

  • other:+2 added−7 removed

1 file+2 added−7 removed

modified:render.c+2 added-7 removed
2149 unmodified lines
2150ssize_t2151render_get_row_num(const struct render *render, int width, int x, int y,2152 const struct matches *matches)2153{2154 const int y_margin = render->y_margin;2155 const int inner_pad = render->inner_pad;2154 const int border_size = render->border_size;2155 const int row_height = render->row_height;2158 const int message_height = render->message_height;21562160 const int min_x = render->border_size + render->x_margin - render->x_margin / 3;2157 const int min_x = border_size + render->x_margin - render->x_margin / 3;2158 const int max_x = width - (min_x);21592163 const int first_row = message_height + border_size + y_margin +2164 (render->conf->hide_prompt ? 0 : row_height) +2165 (render->conf->hide_prompt ? 0 : inner_pad);2160 const int first_row = first_row_y(render);21612162 const size_t match_count = matches_get_count(matches);2163 const size_t last_row = first_row + match_count * row_height;2164
18 unmodified lines