ListEditor: better NavResult in dn(): avoid jumping when calling dn on lowest level

This commit is contained in:
Michael Sippel 2021-08-31 02:11:49 +02:00
parent fdd5e925b1
commit 73eec59f58
Signed by: senvas
GPG key ID: F96CF119C34B64A6
2 changed files with 12 additions and 5 deletions
nested/src/list

View file

@ -130,7 +130,7 @@ where ItemEditor: TerminalTreeEditor + ?Sized + Send + Sync + 'static,
mode: new_cur.leaf_mode,
idx: None
});
TreeNavResult::Exit
TreeNavResult::Continue
}
}
@ -328,12 +328,12 @@ where ItemEditor: TerminalTreeEditor + ?Sized + Send + Sync + 'static,
);
}
}
TreeNavResult::Continue
}
ListCursorMode::Modify => {
self.get_item().unwrap().write().unwrap().dn();
self.get_item().unwrap().write().unwrap().dn()
}
}
TreeNavResult::Continue
}
fn pxev(&mut self) -> TreeNavResult {