Make bindings always fill the whole status bar

Compute padding for key bindings in the status bar such that they use
all available space (without exceeding the given page size).

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-18 09:48:36 +02:00
parent 8d9e4c6102
commit 035faa883b

View File

@ -416,6 +416,8 @@ void
keys_display_bindings_bar(WINDOW * win, int *bindings, int count,
int page_base, int page_size)
{
page_size = MIN(page_size, count - page_base);
/* Padding between two key bindings. */
const int padding =
(col * 2) / page_size - (KEYS_KEYLEN + KEYS_LABELEN + 1);