Also sync when pasting.

See Sourceforge #5327.
This commit is contained in:
Andreas Jönsson 2015-05-30 10:16:19 +02:00
parent 5b28e27b3d
commit 3ca488d0bc

View File

@ -267,6 +267,7 @@ void Notepad_plus::command(int id)
case IDM_EDIT_PASTE: case IDM_EDIT_PASTE:
{ {
LongRunningOperation op;
int eolMode = int(_pEditView->execute(SCI_GETEOLMODE)); int eolMode = int(_pEditView->execute(SCI_GETEOLMODE));
_pEditView->execute(SCI_PASTE); _pEditView->execute(SCI_PASTE);
_pEditView->execute(SCI_CONVERTEOLS, eolMode); _pEditView->execute(SCI_CONVERTEOLS, eolMode);
@ -275,6 +276,7 @@ void Notepad_plus::command(int id)
case IDM_EDIT_PASTE_BINARY: case IDM_EDIT_PASTE_BINARY:
{ {
LongRunningOperation op;
if (!IsClipboardFormatAvailable(CF_TEXT)) if (!IsClipboardFormatAvailable(CF_TEXT))
return; return;
@ -319,6 +321,7 @@ void Notepad_plus::command(int id)
case IDM_EDIT_PASTE_AS_RTF: case IDM_EDIT_PASTE_AS_RTF:
case IDM_EDIT_PASTE_AS_HTML: case IDM_EDIT_PASTE_AS_HTML:
{ {
LongRunningOperation op;
UINT f = RegisterClipboardFormat(id==IDM_EDIT_PASTE_AS_HTML?CF_HTML:CF_RTF); UINT f = RegisterClipboardFormat(id==IDM_EDIT_PASTE_AS_HTML?CF_HTML:CF_RTF);
if (!IsClipboardFormatAvailable(f)) if (!IsClipboardFormatAvailable(f))