0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2011-06-19 01:14:29 +02:00
parent 19e6094378
commit d44347f1e7
8 changed files with 22 additions and 18 deletions

View File

@@ -1410,9 +1410,9 @@ clip_mch_request_selection(VimClipboard *cbd)
{
char_u *temp_clipboard;
/* If the type is not known guess it. */
/* If the type is not known detect it. */
if (metadata.type == -1)
metadata.type = (vim_strchr(str, '\n') == NULL) ? MCHAR : MLINE;
metadata.type = MAUTO;
/* Translate <CR><NL> into <NL>. */
temp_clipboard = crnl_to_nl(str, &str_size);