From 65d591a45510e54724b1b1d1a5e95ff611072a22 Mon Sep 17 00:00:00 2001 From: Zvonimir Rudinski Date: Sun, 2 Jun 2024 06:50:19 +0200 Subject: [PATCH] take height into account --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index fa8da10..406f0c3 100644 --- a/main.c +++ b/main.c @@ -228,10 +228,10 @@ void add_command_handler(int width, int height) { arrput(todos, item); } -void view_command_handler(int width, int index) { +void view_command_handler(int width, int height, int index) { TodoItem item = todos[index]; // create an alert in the middle of the screen - alert(item.title, width, 24); + alert(item.title, width, height); } void mark_command_handler(int index) { @@ -362,7 +362,7 @@ int main(int argc, char **argv) { add_command_handler(terminal_width, terminal_height); break; case VIEW: - view_command_handler(terminal_width, current_line); + view_command_handler(terminal_width, terminal_height, current_line); break; case MARK: case SPACE: