mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-06-10 12:29:30 +00:00
EDIT: Cleaned up handling of file save when opening another file (OA-A)
This commit is contained in:
parent
75c63c89b6
commit
eab93bca09
10
apps/edit.c
10
apps/edit.c
|
@ -2466,8 +2466,14 @@ int edit(char *fname) {
|
|||
break;
|
||||
case 0x80 + 'O': // OA-O "Open"
|
||||
case 0x80 + 'o':
|
||||
if (status[0])
|
||||
save();
|
||||
if (status[0]) { // Buffer is modified
|
||||
if (strlen(filename) == 0)
|
||||
strcpy(userentry, "Save <scratch> buffer");
|
||||
else
|
||||
snprintf(userentry, 80, "Save '%s'", filename);
|
||||
if (prompt_okay(userentry) == 0)
|
||||
save();
|
||||
}
|
||||
file_ui("Open File", "", openfilemsg);
|
||||
if (strlen(userentry) == 0) {
|
||||
draw_screen();
|
||||
|
|
Loading…
Reference in New Issue
Block a user