Document why join_lines has a special case for single-line selections (#20528)
Release Notes: - N/A
This commit is contained in:
parent
b08ac2ae3e
commit
2521ef7bc4
1 changed files with 2 additions and 0 deletions
|
@ -6313,6 +6313,8 @@ impl Editor {
|
|||
let mut row_ranges = Vec::<Range<MultiBufferRow>>::new();
|
||||
for selection in self.selections.all::<Point>(cx) {
|
||||
let start = MultiBufferRow(selection.start.row);
|
||||
// Treat single line selections as if they include the next line. Otherwise this action
|
||||
// would do nothing for single line selections individual cursors.
|
||||
let end = if selection.start.row == selection.end.row {
|
||||
MultiBufferRow(selection.start.row + 1)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue