Ticket #2660: mc-4.8.10-editor-drop-selection-on-CK_Store-configurable.patch

File mc-4.8.10-editor-drop-selection-on-CK_Store-configurable.patch, 2.0 KB (added by sknaumov, 11 years ago)

For those who want good old mc-4.7 behavior and don't want to recompile mc.

  • src/editor/editcmd.c

    diff -uNr mc-4.8.10/src/editor/editcmd.c mc-4.8.10.drop-selection/src/editor/editcmd.c
    old new  
    9191/* queries on a save */ 
    9292int edit_confirm_save = 1; 
    9393 
     94/* whether we need to drop selection on copy to buffer */ 
     95int option_drop_selection_on_copy = 0; 
     96 
    9497/*** file scope macro definitions ****************************************************************/ 
    9598 
    9699#define space_width 1 
     
    28962899    /* try use external clipboard utility */ 
    28972900    mc_event_raise (MCEVENT_GROUP_CORE, "clipboard_file_to_ext_clip", NULL); 
    28982901 
     2902    if (option_drop_selection_on_copy) 
     2903        edit_mark_cmd (edit, TRUE); 
     2904 
    28992905    return TRUE; 
    29002906} 
    29012907 
  • src/editor/edit.h

    diff -uNr mc-4.8.10/src/editor/edit.h mc-4.8.10.drop-selection/src/editor/edit.h
    old new  
    3939extern int option_backspace_through_tabs; 
    4040extern int option_fake_half_tabs; 
    4141extern int option_persistent_selections; 
     42extern int option_drop_selection_on_copy; 
    4243extern int option_cursor_beyond_eol; 
    4344extern gboolean option_cursor_after_inserted_block; 
    4445extern int option_line_state; 
  • src/setup.c

    diff -uNr mc-4.8.10/src/setup.c mc-4.8.10.drop-selection/src/setup.c
    old new  
    349349    { "editor_edit_confirm_save", &edit_confirm_save }, 
    350350    { "editor_syntax_highlighting", &option_syntax_highlighting }, 
    351351    { "editor_persistent_selections", &option_persistent_selections }, 
     352    { "editor_drop_selection_on_copy", &option_drop_selection_on_copy }, 
    352353    { "editor_cursor_beyond_eol", &option_cursor_beyond_eol }, 
    353354    { "editor_cursor_after_inserted_block", &option_cursor_after_inserted_block }, 
    354355    { "editor_visible_tabs", &visible_tabs },