diff options
| author | 2026-03-07 21:50:12 -0500 | |
|---|---|---|
| committer | 2026-03-07 21:50:12 -0500 | |
| commit | 3c47dd2c4802cfe959a628ea55c17a61832a57b1 (patch) | |
| tree | 82467378ffa7a3f3be6191434df556b7b91c3e5f /src/main.rs | |
| parent | make chatbot fill from bottom (diff) | |
added chat scrolling
Diffstat (limited to '')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 9c3d631..23a44f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,7 +70,7 @@ async fn run( // neither blocks the other. loop { // Draw - terminal.draw(|f| ui::draw(f, &app))?; + terminal.draw(|f| ui::draw(f, &mut app))?; // Poll crossterm for keyboard input (non-blocking, 20ms timeout) if event::poll(Duration::from_millis(20))? { @@ -96,6 +96,8 @@ async fn run( (_, KeyCode::Backspace) => app.input_backspace(), (_, KeyCode::Left) => app.cursor_left(), (_, KeyCode::Right) => app.cursor_right(), + (_, KeyCode::Up) => app.scroll_up(), + (_, KeyCode::Down) => app.scroll_down(), (_, KeyCode::Home) => app.cursor = 0, (_, KeyCode::End) => app.cursor = app.input.len(), _ => {} |
