list nav: fix deadlock in goby() horizontal case

This commit is contained in:
Michael Sippel 2023-08-07 21:46:50 +02:00
parent b220d264e4
commit fc9ac6cac7
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -249,10 +249,15 @@ impl TreeNav for ListEditor {
// nested // nested
if cur.tree_addr[0] < self.data.len() as isize { if cur.tree_addr[0] < self.data.len() as isize {
match self.data
.get_mut(cur.tree_addr[0] as usize) let cur_item = self.data
.write().unwrap() .get_mut(cur.tree_addr[0] as usize);
.goby(direction)
let result = cur_item.write().unwrap().goby(direction);
drop(cur_item);
match result
{ {
TreeNavResult::Exit => { TreeNavResult::Exit => {
if direction.y < 0 { if direction.y < 0 {