From a3f7fb80590705c1a7d7b42edd8f5f1362f09cfa Mon Sep 17 00:00:00 2001 From: wrmr Date: Wed, 6 Nov 2024 02:09:26 -0500 Subject: MORE prompt --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3026e23..2150d57 100644 --- a/main.c +++ b/main.c @@ -74,8 +74,8 @@ void cmd_trim(char *buf, size_t max) { } } -int cmd_get(char *buf, size_t n) { - fputs("* ", stdout); +int cmd_get(char *buf, size_t n, struct nav_state *ns) { + nav_prompt(ns); return !!fgets(buf, n, stdin); } @@ -88,7 +88,7 @@ int main(int argc, const char **argv) { } else { nav_redraw(&ns); } - while (cmd_get(cmd_buf, sizeof cmd_buf)) { + while (cmd_get(cmd_buf, sizeof cmd_buf, &ns)) { cmd_trim(cmd_buf, sizeof cmd_buf); if (cmd_do(cmd_buf, &ns)) { break; -- cgit 1.4.1-2-gfad0