From d2c280d441ddf974c90447d0a9252f5711802304 Mon Sep 17 00:00:00 2001 From: wrmr Date: Wed, 6 Nov 2024 00:14:44 -0500 Subject: fix double redraw when passing url as cmd line arg --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 2ac6d21..3026e23 100644 --- a/main.c +++ b/main.c @@ -85,8 +85,9 @@ int main(int argc, const char **argv) { nav_init(&ns); if (argc == 2) { if (nav_to(&ns, argv[1])) perr("navigation failure"); + } else { + nav_redraw(&ns); } - nav_redraw(&ns); while (cmd_get(cmd_buf, sizeof cmd_buf)) { cmd_trim(cmd_buf, sizeof cmd_buf); if (cmd_do(cmd_buf, &ns)) { -- cgit 1.4.1-2-gfad0