Menu

#1530 Add option to control multiple selection copy behavior

Committed
closed
5
2024-08-21
2024-07-12
Zufu Liu
No

Originally request at https://github.com/zufuliu/notepad4/issues/814, VS Code, Sublime Text, CudaText and others, when copy multiple selections, behaviors as if they are rectangular selection in Scintilla.

I think two options (or merged into one) can be added to control Editor::CopySelectionRange() for multiple selection:
1. sort by file position before copy, same as rectangular selection.
2. add line ending for each selection, same as rectangular selection.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2024-07-12
    1. add line ending for each selection, same as rectangular selection.

    There should be a part separator (or terminator?) string that can be set by the application and that defaults to empty. An application may want to make it easy to paste into other applications like spreadsheets that expect tab- or comma-separated values.

    I think I have said this before but couldn't quickly find where.

     
    👍
    1
  • Martijn Laan

    Martijn Laan - 2024-07-26

    Would be great to have this.

     
  • Neil Hodgson

    Neil Hodgson - 2024-07-27
    • Group: Initial --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2024-07-27

    Implemented SCI_SETCOPYSEPARATOR to add a separator string between each part of a selection with [10c62e].

     

    Related

    Commit: [10c62e]

    • Zufu Liu

      Zufu Liu - 2024-08-18

      Not sorted as rectangular selection.

       
      • Neil Hodgson

        Neil Hodgson - 2024-08-21

        That seemed less useful to me so I didn't work on it.

         
        • Zufu Liu

          Zufu Liu - 2024-08-21

          Then, this can be closed.

           
  • Neil Hodgson

    Neil Hodgson - 2024-08-21
    • status: open --> closed
     

Log in to post a comment.