mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05: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:
@@ -2232,7 +2232,7 @@ clip_mch_lose_selection(VimClipboard *cbd)
|
||||
void
|
||||
clip_mch_request_selection(VimClipboard *cbd)
|
||||
{
|
||||
int type = MCHAR;
|
||||
int type = MAUTO;
|
||||
char_u *pAllocated = NULL;
|
||||
char_u *pClipText = NULL;
|
||||
int clip_data_format = 0;
|
||||
@@ -2280,14 +2280,12 @@ clip_mch_request_selection(VimClipboard *cbd)
|
||||
{
|
||||
clip_data_format = CF_TEXT;
|
||||
pClipText = pAllocated;
|
||||
type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR;
|
||||
}
|
||||
|
||||
else if ((pAllocated = Win16GetClipboardData(CF_OEMTEXT)) != NULL)
|
||||
{
|
||||
clip_data_format = CF_OEMTEXT;
|
||||
pClipText = pAllocated;
|
||||
type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR;
|
||||
}
|
||||
|
||||
/* Did we get anything? */
|
||||
|
||||
Reference in New Issue
Block a user