* editcmd.c (edit_quit_cmd): Don't save this command in the undo

stack.  Don't force any refresh.  Don't delete unsaved files, do
it ...
* edit.c (edit_clean): ... here.  This ensures that unsaved
files from the mcedit command line are erased on Ctrl-n.
This commit is contained in:
Pavel Roskin 2003-07-20 23:24:25 +00:00
parent 0633d91f60
commit 9bc8df86ad
3 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,11 @@
2003-07-20 Pavel Roskin <proski@gnu.org>
* editcmd.c (edit_quit_cmd): Don't save this command in the undo
stack. Don't force any refresh. Don't delete unsaved files, do
it ...
* edit.c (edit_clean): ... here. This ensures that unsaved
files from the mcedit command line are erased on Ctrl-n.
* editwidget.c (edit): Remove unused variable "framed".
2003-07-08 Adam Byrtek <alpha@debian.org>

View File

@ -592,6 +592,10 @@ edit_clean (WEdit *edit)
if (option_save_position)
edit_save_position (edit);
/* File specified on the mcedit command line and never saved */
if (edit->delete_file)
unlink (edit->filename);
edit_free_syntax_rules (edit);
book_mark_flush (edit, -1);
for (; j <= MAXBUFF; j++) {

View File

@ -2052,9 +2052,6 @@ void edit_search_cmd (WEdit * edit, int again)
/* Real edit only */
void edit_quit_cmd (WEdit * edit)
{
edit_push_action (edit, KEY_PRESS + edit->start_display);
edit->force |= REDRAW_COMPLETELY;
if (edit->modified) {
switch (edit_query_dialog3 (_ ("Quit"), _ (" File was modified, Save with exit? "), _ ("Cancel quit"), _ ("&Yes"), _ ("&No"))) {
case 1:
@ -2074,8 +2071,6 @@ void edit_quit_cmd (WEdit * edit)
return;
}
}
else if (edit->delete_file)
unlink (edit->filename);
dlg_stop (edit->widget.parent);
}