WIP: Add keybinding to open buffers under cursors
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
cf62d26ed8
commit
3cab32d201
@@ -1105,7 +1105,7 @@ impl Editor {
|
||||
T: ToOffset,
|
||||
{
|
||||
let buffer = self.buffer.read(cx).snapshot(cx);
|
||||
let selections = ranges
|
||||
let mut selections = ranges
|
||||
.into_iter()
|
||||
.map(|range| {
|
||||
let mut start = range.start.to_offset(&buffer);
|
||||
@@ -1124,7 +1124,8 @@ impl Editor {
|
||||
goal: SelectionGoal::None,
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
.collect::<Vec<_>>();
|
||||
selections.sort_unstable_by_key(|s| s.start);
|
||||
self.update_selections(selections, autoscroll, cx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user