Mercurial > vim
comparison src/gui_gtk_x11.c @ 2896:fd4224d9ee09 v7.3.221
updated for version 7.3.221
Problem: Text from the clipboard is sometimes handled as linewise, but not
consistently.
Solution: Assume the text is linewise when it ends in a CR or NL.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 19 Jun 2011 01:14:29 +0200 |
parents | 31757405c0c5 |
children | 7653420fdc45 |
comparison
equal
deleted
inserted
replaced
2895:307eb4bcc51a | 2896:fd4224d9ee09 |
---|---|
1171 VimClipboard *cbd; | 1171 VimClipboard *cbd; |
1172 char_u *text; | 1172 char_u *text; |
1173 char_u *tmpbuf = NULL; | 1173 char_u *tmpbuf = NULL; |
1174 guchar *tmpbuf_utf8 = NULL; | 1174 guchar *tmpbuf_utf8 = NULL; |
1175 int len; | 1175 int len; |
1176 int motion_type; | 1176 int motion_type = MAUTO; |
1177 | 1177 |
1178 if (data->selection == clip_plus.gtk_sel_atom) | 1178 if (data->selection == clip_plus.gtk_sel_atom) |
1179 cbd = &clip_plus; | 1179 cbd = &clip_plus; |
1180 else | 1180 else |
1181 cbd = &clip_star; | 1181 cbd = &clip_star; |
1182 | 1182 |
1183 text = (char_u *)data->data; | 1183 text = (char_u *)data->data; |
1184 len = data->length; | 1184 len = data->length; |
1185 motion_type = MCHAR; | |
1186 | 1185 |
1187 if (text == NULL || len <= 0) | 1186 if (text == NULL || len <= 0) |
1188 { | 1187 { |
1189 received_selection = RS_FAIL; | 1188 received_selection = RS_FAIL; |
1190 /* clip_free_selection(cbd); ??? */ | 1189 /* clip_free_selection(cbd); ??? */ |