Don't merge keymap contexts from containing elements

Co-Authored-By: Aaron Hillegass <charmedliferaft@gmail.com>
This commit is contained in:
Nathan Sobo
2021-12-24 16:44:35 -07:00
co-authored by Aaron Hillegass
parent 9fc2ddb8da
commit e9a750be71
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -1047,6 +1047,11 @@ impl Editor {
let buffer = self.buffer.read(cx).snapshot(cx);
let mut oldest_selection = self.oldest_selection::<usize>(&buffer);
if self.selection_count() == 1 {
if oldest_selection.is_empty() {
cx.propagate_action();
return;
}
oldest_selection.start = oldest_selection.head().clone();
oldest_selection.end = oldest_selection.head().clone();
}