Skip to content

Making multiple selections of lines, then performing the action Sort lines ascending or Sort lines descending only works on the first selection #36562

@Markussss

Description

@Markussss
  • VSCode Version: Version 1.17.0
  • OS Version: Fedora 26, 4.13.5-200.fc26.x86_64

When trying to sort several highlighted blocks of text, using several cursors in one file, only one of the blocks are sorted.

Steps to Reproduce:

  1. Create a file with several sections that can be sorted. Exaple:
section 1:
a
d
b
c

section 2:
d
c
a
b
  1. Place cursor on the start of one of the sections, create a new cursor by holding down alt and clicking at the start of the other section.
  2. Highlight all four rows of letters in each section by holding Shift, while using the arrow/home/end keys.
  3. Press Ctrl+Shift+P and select «Sort Lines Ascending» or «Sort Lines Descending».
  4. Result is that only one of the highlighted blocks are sorted.

Reproduces without extensions: Yes

Metadata

Metadata

Assignees

Labels

editor-contribEditor collection of extrasfeature-requestRequest for new features or functionalitygood first issueIssues identified as good for first-time contributorsverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions