Menu

#2167 Qt on Windows doesn't support MSDEVLineSelect

Bug
closed-fixed
5
2020-04-27
2020-04-09
No

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

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2020-04-09
    • labels: --> scintilla, qt, copy, paste, win32
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2020-04-09

    Current Visual Studio no longer supports MSDEVLineSelect but instead uses VisualStudioEditorOperationsLineCutCopyClipboardTag which is wrapped to application/x-qt-windows-mime;value="VisualStudioEditorOperationsLineCutCopyClipboardTag" when received from Visual Studio by Qt. Scintilla for Win32 updated for this with [#1636].

    AddLineSelectToMime doesn't need a su parameter.

    First comment in IsLineSelectInMime is 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: #1636

  • Justin Dailey

    Justin Dailey - 2020-04-09

    Neil, 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
  • Neil Hodgson

    Neil Hodgson - 2020-04-10
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2020-04-10

    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]

  • Neil Hodgson

    Neil Hodgson - 2020-04-27
    • status: open-fixed --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2020-04-27

    Committed fix as [82b221].

     

    Related

    Commit: [82b221]


Log in to post a comment.

MongoDB Logo MongoDB