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
if cur.tree_addr[0] < self.data.len() as isize {
match self.data
.get_mut(cur.tree_addr[0] as usize)
.write().unwrap()
.goby(direction)
let cur_item = self.data
.get_mut(cur.tree_addr[0] as usize);
let result = cur_item.write().unwrap().goby(direction);
drop(cur_item);
match result
{
TreeNavResult::Exit => {
if direction.y < 0 {