Menu

#1541 Add Selection::SortedRanges()

Initial
open
5
2025-01-16
2025-01-15
Zufu Liu
No

Extract std::vector<SelectionRange *> selPtrs; building code from Editor::InsertCharacter() as Selection::SortedRanges(), and reuse it for Editor::CopySelectionRange() to make copied text for multiple selections sorted ([feature-requests:#1530]).

This change (eliminated one std::sort()) makes msvc x64 Scintilla.dll 4KB smaller.

1 Attachments

Related

Feature Requests: #1530

Discussion

  • Neil Hodgson

    Neil Hodgson - 2025-01-15

    This includes both implementation changes and a behavioural change.

    The change in behaviour stops the user being able to control the order in which a set of items is copied to the clipboard. This may be seen as a regression in functionality.

     
  • Zufu Liu

    Zufu Liu - 2025-01-16

    Renamed to OrderedRanges(bool sorted) and keep current CopySelectionRange() behavior.

     

Log in to post a comment.