From 9a617a6d5a72142ef1d6c24ed40f44bd70cef82c Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 5 Mar 2016 11:53:00 +0300 Subject: [PATCH] Ticket #3557: mcedit should not be closed on Ctrl-G. Signed-off-by: Andrew Borodin --- src/editor/editwidget.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 0fd3658cc..6f72fd4a8 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -742,13 +742,14 @@ edit_dialog_command_execute (WDialog * h, long command) break; case CK_Quit: case CK_Cancel: + /* don't close editor due to SIGINT, but stop move/resize window */ { Widget *w = WIDGET (h->current->data); - if (!edit_widget_is_editor (w) || ((WEdit *) w)->drag_state == MCEDIT_DRAG_NORMAL) - dlg_stop (h); - else + if (edit_widget_is_editor (w) && ((WEdit *) w)->drag_state != MCEDIT_DRAG_NORMAL) edit_restore_size ((WEdit *) w); + else if (command == CK_Quit) + dlg_stop (h); } break; case CK_About: