aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-08-19 09:56:33 +1000
committerNeil <nyamatongwe@gmail.com>2014-08-19 09:56:33 +1000
commitbfa49e19fad49f41b5bf9020d192e0fad1e9e664 (patch)
treec463b793250af113d6335a6cbd5e953d4b4a61e6
parentd22aad54e9d2b0a5d9e5ee31639b61e44bea5769 (diff)
downloadscintilla-mirror-bfa49e19fad49f41b5bf9020d192e0fad1e9e664.tar.gz
Bug [#1636]. Support Visual Studio 2010+ line copy clipboard tag.
-rw-r--r--doc/ScintillaHistory.html6
-rw-r--r--win32/ScintillaWin.cxx8
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index fef4804c8..1640dd0ff 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -474,10 +474,14 @@
Released 13 August 2014.
</li>
<li>
- On Windows only unregister windows classes registered..
+ On Windows only unregister windows classes registered.
<a href="http://sourceforge.net/p/scintilla/bugs/1639/">Bug #1639</a>.
</li>
<li>
+ On Windows support the Visual Studio 2010+ clipboard format that indicates a line copy.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1636/">Bug #1636</a>.
+ </li>
+ <li>
SciTE session files remember the scroll position.
</li>
</ul>
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index b69b3cadb..2ff660a09 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -197,6 +197,7 @@ class ScintillaWin :
CLIPFORMAT cfColumnSelect;
CLIPFORMAT cfBorlandIDEBlockType;
CLIPFORMAT cfLineSelect;
+ CLIPFORMAT cfVSLineTag;
HRESULT hrOle;
DropSource ds;
@@ -366,7 +367,8 @@ ScintillaWin::ScintillaWin(HWND hwnd) {
// Likewise for line-copy (copies a full line when no text is selected)
cfLineSelect = static_cast<CLIPFORMAT>(
::RegisterClipboardFormat(TEXT("MSDEVLineSelect")));
-
+ cfVSLineTag = static_cast<CLIPFORMAT>(
+ ::RegisterClipboardFormat(TEXT("VisualStudioEditorOperationsLineCutCopyClipboardTag")));
hrOle = E_FAIL;
wMain = hwnd;
@@ -1884,7 +1886,8 @@ void ScintillaWin::Paste() {
if (!::OpenClipboard(MainHWND()))
return;
UndoGroup ug(pdoc);
- const bool isLine = SelectionEmpty() && (::IsClipboardFormatAvailable(cfLineSelect) != 0);
+ const bool isLine = SelectionEmpty() &&
+ (::IsClipboardFormatAvailable(cfLineSelect) || ::IsClipboardFormatAvailable(cfVSLineTag));
ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
bool isRectangular = (::IsClipboardFormatAvailable(cfColumnSelect) != 0);
@@ -2451,6 +2454,7 @@ void ScintillaWin::CopyToClipboard(const SelectionText &selectedText) {
if (selectedText.lineCopy) {
::SetClipboardData(cfLineSelect, 0);
+ ::SetClipboardData(cfVSLineTag, 0);
}
::CloseClipboard();