mirror of
https://github.com/patriceckhart/zot.git
synced 2026-07-03 08:39:52 +02:00
On a terminal too short to show every row, /sessions used to render the whole list top-to-bottom \u2014 the cursor would move but the overflowing rows at the bottom got clipped off the screen and you could never reach them visually. up/down still worked logically but the user had no way to see which row was currently selected past the cutoff. The dialog now keeps a viewport around the cursor. MaxRows is set by the interactive host each frame to (terminal rows - 12) with a min of 3, so the viewport grows with the window. The cursor stays two rows inside the top/bottom edge of the viewport (one row when the viewport itself is very small) so you can see what's coming next. When content is hidden above or below, a muted "\u2191 N more above" / "\u2193 N more below" marker replaces the offscreen rows so you know there's more. Keys: up / down move one row (unchanged), PgUp / PgDn jump one page (viewport size minus 1 for overlap), Home / End go to the first / last entry, Enter / Esc unchanged. The hint line in the dialog header now mentions pgup/pgdn so it's discoverable. Empty-list behaviour is unchanged; the no-sessions message still renders as before. |
||
|---|---|---|
| .. | ||
| telegram | ||
| btw_dialog.go | ||
| changelog_dialog.go | ||
| confirm_dialog.go | ||
| dialog_frame.go | ||
| help.go | ||
| interactive.go | ||
| json.go | ||
| jump_dialog.go | ||
| login_dialog.go | ||
| logout_dialog.go | ||
| model_dialog.go | ||
| print.go | ||
| session_dialog.go | ||
| session_ops_dialog.go | ||
| session_tree_dialog.go | ||
| skills_dialog.go | ||
| slash_suggest.go | ||
| spinner.go | ||
| telegram_dialog.go | ||
| update_banner.go | ||
| welcome.go | ||