Reverse columnar selections when head moves before tail's column
This commit is contained in:
parent
d19d3bbe45
commit
3a9b69077e
1 changed files with 2 additions and 1 deletions
|
@ -923,6 +923,7 @@ impl Editor {
|
|||
let end_row = cmp::max(tail.row(), head.row());
|
||||
let start_column = cmp::min(tail.column(), head.column() + overshoot);
|
||||
let end_column = cmp::max(tail.column(), head.column() + overshoot);
|
||||
let reversed = start_column < tail.column();
|
||||
|
||||
let selections = (start_row..=end_row)
|
||||
.filter_map(|row| {
|
||||
|
@ -937,7 +938,7 @@ impl Editor {
|
|||
id: post_inc(&mut self.next_selection_id),
|
||||
start,
|
||||
end,
|
||||
reversed: false,
|
||||
reversed,
|
||||
goal: SelectionGoal::None,
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue