mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Ticket #3111: configurable selection reset on CK_Store.
In mc-4.7.x.x selection was reset on CK_Store (copy to buffer). In mc-4.8.x (4.8.11 and older) it is not. Now this behavior is configurable using editor_drop_selection_on_copy key in the ini file. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4ad5b134dc
commit
fb9b12c3d2
@ -556,6 +556,9 @@ Toggle show visible tabs, if editor_visible_tabs=1 tabs showed as '<\-\-\-\->'
|
||||
.I editor_persistent_selections
|
||||
Do not remove block selection after moving the cursor.
|
||||
.TP
|
||||
.I editor_drop_selection_on_copy
|
||||
Reset selection after copy to clipboard.
|
||||
.TP
|
||||
.I editor_cursor_beyond_eol
|
||||
Allow moving cursor beyond the end of line.
|
||||
.TP
|
||||
|
@ -39,6 +39,7 @@ extern int option_return_does_auto_indent;
|
||||
extern int option_backspace_through_tabs;
|
||||
extern int option_fake_half_tabs;
|
||||
extern int option_persistent_selections;
|
||||
extern int option_drop_selection_on_copy;
|
||||
extern int option_cursor_beyond_eol;
|
||||
extern gboolean option_cursor_after_inserted_block;
|
||||
extern int option_line_state;
|
||||
|
@ -91,6 +91,9 @@ int search_create_bookmark = FALSE;
|
||||
/* queries on a save */
|
||||
int edit_confirm_save = 1;
|
||||
|
||||
/* whether we need to drop selection on copy to buffer */
|
||||
int option_drop_selection_on_copy = 1;
|
||||
|
||||
/*** file scope macro definitions ****************************************************************/
|
||||
|
||||
#define space_width 1
|
||||
@ -2899,6 +2902,9 @@ edit_copy_to_X_buf_cmd (WEdit * edit)
|
||||
/* try use external clipboard utility */
|
||||
mc_event_raise (MCEVENT_GROUP_CORE, "clipboard_file_to_ext_clip", NULL);
|
||||
|
||||
if (option_drop_selection_on_copy)
|
||||
edit_mark_cmd (edit, TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -349,6 +349,7 @@ static const struct
|
||||
{ "editor_edit_confirm_save", &edit_confirm_save },
|
||||
{ "editor_syntax_highlighting", &option_syntax_highlighting },
|
||||
{ "editor_persistent_selections", &option_persistent_selections },
|
||||
{ "editor_drop_selection_on_copy", &option_drop_selection_on_copy },
|
||||
{ "editor_cursor_beyond_eol", &option_cursor_beyond_eol },
|
||||
{ "editor_cursor_after_inserted_block", &option_cursor_after_inserted_block },
|
||||
{ "editor_visible_tabs", &visible_tabs },
|
||||
|
Loading…
Reference in New Issue
Block a user