commit cfb52f7e69a15d7e8f424fa987b42493c87e658b
parent a0e1b0310e3a56c83d161c37b8fc5b556dc7f575
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Mon, 31 May 2021 22:07:51 +0200
adjust header width on resize
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/diary.c b/diary.c
@@ -311,7 +311,7 @@ bool read_config(const char* file_path)
void usage() {
printf("Usage : diary [OPTION]... [DIRECTORY]...\n");
printf("\n");
- printf("Simple CLI diary (v%s)\n", DIARY_VERSION);
+ printf("Diary, journaling TUI (v%s)\n", DIARY_VERSION);
printf("Edit journal entries from the command line\n");
printf("\n");
printf("Options:\n");
@@ -686,9 +686,10 @@ int main(int argc, char** argv) {
if (mv_valid) {
update_date(header);
- // adjust prev width (if terminal was resized in the mean time)
+ // adjust prev and header width (if terminal was resized in the mean time)
prev_width = COLS - ASIDE_WIDTH - CAL_WIDTH;
wresize(prev, prev_height, prev_width);
+ wresize(header, 1, prev_width);
// read the diary
display_entry(CONFIG.dir, diary_dir_size, &curs_date, prev, prev_width);