Center cursor on screen

This commit is contained in:
Joscha 2022-08-09 15:51:47 +02:00
parent a4b79d4e81
commit 5acb4c6396
4 changed files with 41 additions and 1 deletions

View file

@ -379,6 +379,10 @@ impl<M: Msg, S: MsgStore<M>> InnerTreeViewState<M, S> {
self.correction = Some(Correction::MoveCursorToVisibleArea);
}
pub fn center_cursor(&mut self) {
self.correction = Some(Correction::CenterCursor);
}
pub async fn parent_for_normal_reply(&self) -> Option<Option<M::Id>> {
match &self.cursor {
Cursor::Bottom => Some(None),