Ticket #2229: mc-no-mcview_update-on-quit.patch
File mc-no-mcview_update-on-quit.patch, 1.9 KB (added by gotar, 14 years ago) |
---|
-
actions_cmd.c
old new mcview_handle_editkey (mcview_t * view, 242 242 243 243 /* --------------------------------------------------------------------------------------------- */ 244 244 245 static cb_ret_t245 static int 246 246 mcview_execute_cmd (mcview_t * view, unsigned long command) 247 247 { 248 248 int res = MSG_HANDLED; … … mcview_execute_cmd (mcview_t * view, uns 376 376 case CK_ViewQuit: 377 377 if (!mcview_is_in_panel (view)) 378 378 dlg_stop (view->widget.owner); 379 break;379 return -1; 380 380 default: 381 381 res = MSG_NOT_HANDLED; 382 382 } … … mcview_execute_cmd (mcview_t * view, uns 384 384 } 385 385 386 386 /* Both views */ 387 static cb_ret_t387 static int 388 388 mcview_handle_key (mcview_t * view, int key) 389 389 { 390 390 unsigned long command; 391 int res; 391 392 392 393 key = convert_from_input_c (key); 393 394 … … mcview_handle_key (mcview_t * view, int 402 403 } 403 404 404 405 command = lookup_keymap_command (view->plain_map, key); 405 if ((command != CK_Ignore_Key) && (mcview_execute_cmd (view, command) == MSG_HANDLED)) 406 return MSG_HANDLED; 406 if (command != CK_Ignore_Key) 407 { 408 res = mcview_execute_cmd (view, command); 409 if (res != MSG_NOT_HANDLED) 410 return res; 411 } 407 412 408 413 #ifdef MC_ENABLE_DEBUGGING_CODE 409 414 if (c == 't') … … cb_ret_t 450 455 mcview_callback (Widget * w, widget_msg_t msg, int parm) 451 456 { 452 457 mcview_t *view = (mcview_t *) w; 453 cb_ret_t i;458 int i; 454 459 455 460 mcview_compute_areas (view); 456 461 mcview_update_bytes_per_line (view); … … mcview_callback (Widget * w, widget_msg_ 475 480 476 481 case WIDGET_KEY: 477 482 i = mcview_handle_key (view, parm); 478 mcview_update (view); 483 if (i == MSG_HANDLED) 484 mcview_update (view); 485 if (i == -1) 486 i = MSG_HANDLED; 479 487 return i; 480 488 481 489 case WIDGET_COMMAND: