diff options
author | nyamatongwe <devnull@localhost> | 2010-05-21 23:53:50 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-05-21 23:53:50 +0000 |
commit | 1767f2c120f36700359d53730ad83873cf301a9d (patch) | |
tree | a567c3683c180a5a9af4c3feb766abd7097a716f | |
parent | d88e97b7adf3366673c1dd24670e7c058761a030 (diff) | |
download | scintilla-mirror-1767f2c120f36700359d53730ad83873cf301a9d.tar.gz |
EOL conversion for drop. Fixes bug #3005328.
-rw-r--r-- | win32/ScintillaWin.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 59df887f5..5fb6e5286 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2377,6 +2377,16 @@ STDMETHODIMP ScintillaWin::Drop(LPDATAOBJECT pIDataSource, DWORD grfKeyState, } } + if (data && convertPastes) { + // Convert line endings of the drop into our local line-endings mode + int len = strlen(data); + char *convertedText = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); + if (dataAllocated) + delete []data; + data = convertedText; + dataAllocated = true; + } + if (!data) { //Platform::DebugPrintf("Bad data format: 0x%x\n", hres); return hr; |