Skip to content
Snippets Groups Projects
Commit cf9145a7 authored by piyo's avatar piyo
Browse files

Confirm quit action during scan only when --confirm-quit

parent bfff5762
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ void dir_draw() { ...@@ -211,7 +211,7 @@ void dir_draw() {
int dir_key(int ch) { int dir_key(int ch) {
if(dir_fatalerr) if(dir_fatalerr)
return 1; return 1;
if(confirm_quit_while_scanning_stage_1_passed) { if(confirm_quit && confirm_quit_while_scanning_stage_1_passed) {
if (ch == 'y'|| ch == 'Y') { if (ch == 'y'|| ch == 'Y') {
return 1; return 1;
} else { } else {
...@@ -219,8 +219,11 @@ int dir_key(int ch) { ...@@ -219,8 +219,11 @@ int dir_key(int ch) {
return 0; return 0;
} }
} else if(ch == 'q') { } else if(ch == 'q') {
confirm_quit_while_scanning_stage_1_passed = 1; if(confirm_quit) {
return 0; confirm_quit_while_scanning_stage_1_passed = 1;
return 0;
} else
return 1;
} }
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment