feat: print helpful suggestion when using :{,r}sort
incorrectly (#12585)
This commit is contained in:
parent
259be07f05
commit
7c907e66f4
1 changed files with 4 additions and 0 deletions
|
@ -2116,6 +2116,10 @@ fn sort_impl(
|
|||
|
||||
let selection = doc.selection(view.id);
|
||||
|
||||
if selection.len() == 1 {
|
||||
bail!("Sorting requires multiple selections. Hint: split selection first");
|
||||
}
|
||||
|
||||
let mut fragments: Vec<_> = selection
|
||||
.slices(text)
|
||||
.map(|fragment| fragment.chunks().collect())
|
||||
|
|
Loading…
Add table
Reference in a new issue