diff options
| author | verdant <im@verdant.ee> | 2026-08-03 19:22:07 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-08-03 19:22:07 +0800 |
| commit | 788a7605fc36140f3bf4c7c155f73a530c46cb42 (patch) | |
| tree | ec4cacecf81642d822f92edfbbdcf744b496b7d1 | |
| parent | 0ae25f1097f921f0931e3e23d4749debc57b63be (diff) | |
| download | sf-788a7605fc36140f3bf4c7c155f73a530c46cb42.tar.gz sf-788a7605fc36140f3bf4c7c155f73a530c46cb42.zip | |
Return -1 to avoid creating directory when esc is pressed
| -rw-r--r-- | src/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index 20f95b7..20387c0 100644 --- a/src/utils.c +++ b/src/utils.c @@ -30,7 +30,7 @@ get_input(const char *prompt, char *buf) } else if (ch == 27) { werase(status_window->win); curs_set(0); - return 0; + return -1; } else if (ch == KEY_ENTER || ch == '\n' || ch == '\r') { if (i < PATH_MAX) { buf[++i] = '\0'; |
