Specs:
Qt 5.14
Scintilla 4.3.2
Windows 10
Visual Studio 2017
Use case:
I am using SCI_COPYALLOWLINE however when pasting the text it does not work correctly. The expected behavior is to paste the text as an entirely new line, however it is just pasting it inline.
It appears Qt on Windows does not use the "MSDEVLineSelect" minetype at all when copying or pasting the text.
I have attached a preliminary patch which seems to fix the issue, however I am not sure if there are corner case and/or other platforms that need handled. I just went based off what was currently there, plus a bit of code from ScintillaWin.cxx
Current Visual Studio no longer supports
MSDEVLineSelectbut instead usesVisualStudioEditorOperationsLineCutCopyClipboardTagwhich is wrapped toapplication/x-qt-windows-mime;value="VisualStudioEditorOperationsLineCutCopyClipboardTag"when received from Visual Studio by Qt. Scintilla for Win32 updated for this with [#1636].AddLineSelectToMimedoesn't need asuparameter.First comment in
IsLineSelectInMimeis copied from old method and is not correct.If you have access to Linux or macOS machines then implementing a line selection format or tag in a way similar to the rectangular code would be worthwhile but it can always be added later by people interested in that feature. I don't know of any standards for marking the clipboard as containing lines (or being rectangular) on Unix so there could be some more Scintilla-specific names.
Related
Bugs:
#1636Neil, Thanks for the info and feedback!
I do not have access to Linux or macOS so I'm not sure what changes would need to be made on those.
I've attached an updated patch that is only for Windows.
Last edit: Justin Dailey 2020-04-09
Committed fix as [82b221].
More changes to ScintillaQt.cpp in next 3 commits so any further patches should be against most recent version.
Related
Commit: [82b221]
Committed fix as [82b221].
Related
Commit: [82b221]