Skip to content

Commit

Permalink
Reverse help list
Browse files Browse the repository at this point in the history
Key binding list is reversed, so we also need to reverse help iterator.

Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Jul 10, 2024
1 parent c2ed948 commit 5e67d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,11 +557,11 @@ static void switch_help(void)
}
ctx.help = calloc(1, ctx.help_sz * sizeof(*ctx.help));
if (ctx.help) {
size_t i = 0;
size_t i = ctx.help_sz - 1;
kb = keybind_all();
while (kb) {
if (kb->help) {
font_render(kb->help, &ctx.help[i++]);
font_render(kb->help, &ctx.help[i--]);
}
kb = kb->next;
}
Expand Down

0 comments on commit 5e67d18

Please sign in to comment.