aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-08-03 19:22:07 +0800
committerverdant <im@verdant.ee>2026-08-03 19:22:07 +0800
commit788a7605fc36140f3bf4c7c155f73a530c46cb42 (patch)
treeec4cacecf81642d822f92edfbbdcf744b496b7d1 /src/utils.c
parent0ae25f1097f921f0931e3e23d4749debc57b63be (diff)
downloadsf-788a7605fc36140f3bf4c7c155f73a530c46cb42.tar.gz
sf-788a7605fc36140f3bf4c7c155f73a530c46cb42.zip
Return -1 to avoid creating directory when esc is pressed
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c2
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';