From bfa49e19fad49f41b5bf9020d192e0fad1e9e664 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 19 Aug 2014 09:56:33 +1000 Subject: Bug [#1636]. Support Visual Studio 2010+ line copy clipboard tag. --- doc/ScintillaHistory.html | 6 +++++- win32/ScintillaWin.cxx | 8 ++++++-- 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.
  • - On Windows only unregister windows classes registered.. + On Windows only unregister windows classes registered. Bug #1639.
  • + On Windows support the Visual Studio 2010+ clipboard format that indicates a line copy. + Bug #1636. +
  • +
  • SciTE session files remember the scroll position.
  • 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( ::RegisterClipboardFormat(TEXT("MSDEVLineSelect"))); - + cfVSLineTag = static_cast( + ::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(); -- cgit v1.2.3