Fix scrolling when composing a new thread
When composing a new thread and writing more than one line, the chat wouldn't scroll to make the editor cursor visible again. My original guess for when the scrolling code should run was a bit too restrictive.
This commit is contained in:
parent
4d1a42427a
commit
2dfdbbb4d2
1 changed files with 2 additions and 15 deletions
|
|
@ -327,21 +327,8 @@ impl<M: Msg + ChatMsg, S: MsgStore<M>> InnerTreeViewState<M, S> {
|
|||
}
|
||||
|
||||
fn scroll_so_cursor_is_visible(&self, frame: &mut Frame, blocks: &mut TreeBlocks<M::Id>) {
|
||||
if !matches!(
|
||||
self.cursor,
|
||||
Cursor::Msg(_)
|
||||
| Cursor::Editor {
|
||||
parent: Some(_),
|
||||
..
|
||||
}
|
||||
| Cursor::Pseudo {
|
||||
parent: Some(_),
|
||||
..
|
||||
}
|
||||
) {
|
||||
// In all other cases, there is no need to make the cursor visible
|
||||
// since scrolling behaves differently enough.
|
||||
return;
|
||||
if matches!(self.cursor, Cursor::Bottom) {
|
||||
return; // Cursor is locked to bottom
|
||||
}
|
||||
|
||||
let block = blocks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue