From 0cf3febd2b7dc6dc3e7f0e00b53f26b709a0694e Mon Sep 17 00:00:00 2001 From: Zvonimir Rudinski Date: Sun, 2 Jun 2024 05:57:35 +0200 Subject: [PATCH] add save file path to the header --- main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 52e3201..4611db7 100644 --- a/main.c +++ b/main.c @@ -18,7 +18,7 @@ #include "3rd-party/stb-ds.h" -char SAVE_FILE[MAX_PATH_LENGTH] = "todos.todd"; +char SAVE_FILE[MAX_PATH_LENGTH] = ""; TodoItem *todos = NULL; enum Command { @@ -70,8 +70,9 @@ void initialize_curses(int *width, int *height) { void draw_header(int width) { attron(COLOR_PAIR(BORDERS_PAIR)); move(0, 0); - addstr(" Todd"); - for (int i = strlen("Todd"); i < width - 1; i++) { + addstr(" Todd - "); + addstr(SAVE_FILE); + for (int i = strlen(" Todd - ") + strlen(SAVE_FILE); i < width - 1; i++) { addch(' '); } }