-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmc-4.7.0-pre2-editcmd_xclip.patch
44 lines (41 loc) · 1.27 KB
/
mc-4.7.0-pre2-editcmd_xclip.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- /backup/_Distr/mc/mc-4.7.0-pre2/edit/editcmd.c 2009-08-25 22:51:56.000000000 +0400
+++ /home/uchti/workspace/mc/edit/editcmd.c 2009-09-11 14:59:36.680606755 +0400
@@ -1805,7 +1805,7 @@
int edit_copy_to_X_buf_cmd (WEdit * edit)
{
- long start_mark, end_mark;
+ long start_mark, end_mark;
if (eval_marks (edit, &start_mark, &end_mark))
return 0;
if (!edit_save_block_to_clip_file (edit, start_mark, end_mark)) {
@@ -1813,12 +1813,18 @@
return 1;
}
edit_mark_cmd (edit, 1);
+ char *tmp,*res;
+ res = concat_dir_and_file (home_dir, EDIT_CLIP_FILE);
+ tmp = g_strconcat ("xclip -i ",res," -selection clipboard", NULL );
+ system (tmp);
+ g_free(res);
+ g_free(tmp);
return 0;
}
int edit_cut_to_X_buf_cmd (WEdit * edit)
{
- long start_mark, end_mark;
+ long start_mark, end_mark;
if (eval_marks (edit, &start_mark, &end_mark))
return 0;
if (!edit_save_block_to_clip_file (edit, start_mark, end_mark)) {
@@ -1827,6 +1833,12 @@
}
edit_block_delete_cmd (edit);
edit_mark_cmd (edit, 1);
+ char *tmp, *res;
+ res = concat_dir_and_file (home_dir, EDIT_CLIP_FILE);
+ tmp = g_strconcat ("xclip -i ",res," -selection clipboard", NULL );
+ system (tmp);
+ g_free(res);
+ g_free(tmp);
return 0;
}