forked from genewildish/Mainline
Add mouse wheel and keyboard scrolling support to REPL
- Add scroll_offset to REPLState (max 50 lines) - Modify _render_repl() to use manual scroll position - Add scroll_output(delta) method for scroll control - Add PageUp/PageDown keyboard support (scroll 10 lines) - Add mouse wheel support via SGR mouse tracking - Update HUD to show scroll percentage (like vim) and position - Reset scroll when new output arrives - Add tests for scroll functionality
This commit is contained in:
@@ -108,6 +108,22 @@ Pipeline effects:
|
||||
Effect 'repl' set to off
|
||||
```
|
||||
|
||||
## Scrolling Support
|
||||
|
||||
The REPL output buffer supports scrolling through command history:
|
||||
|
||||
**Keyboard Controls:**
|
||||
- **PageUp** - Scroll up 10 lines
|
||||
- **PageDown** - Scroll down 10 lines
|
||||
- **Mouse wheel up** - Scroll up 3 lines
|
||||
- **Mouse wheel down** - Scroll down 3 lines
|
||||
|
||||
**Scroll Features:**
|
||||
- **Scroll percentage** shown in HUD (like vim, e.g., "50%")
|
||||
- **Scroll position** shown in output line (e.g., "(5/20)")
|
||||
- **Auto-reset** - Scroll resets to bottom when new output arrives
|
||||
- **Max buffer** - 50 lines (excluding empty lines)
|
||||
|
||||
## Notes
|
||||
|
||||
- The REPL effect needs a content source to overlay on (e.g., headlines, poetry, empty)
|
||||
|
||||
Reference in New Issue
Block a user