Skip to main content

place_cursor

Function place_cursor 

Source
pub fn place_cursor(f: &mut Frame<'_>, app: &App, area: Rect)
Expand description

Set the terminal cursor inside the input area.

Accounts for newlines (row offset) and wide characters (column offset) so the cursor visually lands at [AppState::input_cursor].

ยงExamples

// Requires a live terminal backend; cannot run in doc tests.
use codetether_agent::tui::ui::chat_view::cursor::place_cursor;
let area = ratatui::layout::Rect::new(0, 0, 40, 3);
place_cursor(f, app, area);