Mercurial > vim
comparison src/os_mswin.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 | 951641b8784d |
children | 4e21fd3cfc30 |
comparison
equal
deleted
inserted
replaced
2895:307eb4bcc51a | 2896:fd4224d9ee09 |
---|---|
1408 | 1408 |
1409 if (str != NULL && *str != NUL) | 1409 if (str != NULL && *str != NUL) |
1410 { | 1410 { |
1411 char_u *temp_clipboard; | 1411 char_u *temp_clipboard; |
1412 | 1412 |
1413 /* If the type is not known guess it. */ | 1413 /* If the type is not known detect it. */ |
1414 if (metadata.type == -1) | 1414 if (metadata.type == -1) |
1415 metadata.type = (vim_strchr(str, '\n') == NULL) ? MCHAR : MLINE; | 1415 metadata.type = MAUTO; |
1416 | 1416 |
1417 /* Translate <CR><NL> into <NL>. */ | 1417 /* Translate <CR><NL> into <NL>. */ |
1418 temp_clipboard = crnl_to_nl(str, &str_size); | 1418 temp_clipboard = crnl_to_nl(str, &str_size); |
1419 if (temp_clipboard != NULL) | 1419 if (temp_clipboard != NULL) |
1420 { | 1420 { |