commit 6e612384aadf937b8f5f2b701eaa5e5d2dd9c067
Author: Raniconduh <clagv.randomgames@gmail.com>
Date: Sat Oct 09 08:26:01 2021 +0000
diff --git a/src/io.c b/src/io.c
index 5b18295..1bca530 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1556 +1557 @@ char * prompt(char * t, char ** args) {
if (!args) {
wrefresh(w);
napms(3500);
+ delwin(w);
return NULL;
}
@@ -1966 +1977 @@ char * prompt(char * t, char ** args) {
if ((unsigned)cursor < argcount) cursor++;
break;
case '\n':
+ delwin(w);
return args[cursor - 1];
case 'q':
case 27:
@@ -2035 +2056 @@ char * prompt(char * t, char ** args) {
}
}
done:;
+ delwin(w);
return NULL;
}
diff --git a/src/main.c b/src/main.c
index c5d77b9..bb1f611 100644
--- a/src/main.c
+++ b/src/main.c
@@ -257 +257 @@ int main(int argc, char ** argv) {
size_t first_f, last_f;
first_f = cursor - 1;
- last_f = n_dir_entries > ((unsigned)LINES - 6) ? LINES - 6 : n_dir_entries;
+ last_f = LAST_F;
while (true) {
erase();
@@ -1167 +1167 @@ int main(int argc, char ** argv) {
break;
char * name = dir_entries[cursor - 1]->name;
char * p = malloc(20 + strlen(name));
- char * args[] = {"Yes", "No", NULL};
+ char * args[] = {"No", "Yes", NULL};
sprintf(p, "Delete the file '%s'?", name);
char * resp = prompt(p, args);
free(p);