Skip to content

feat: add terminal scrolling by lines and pages - #409

Merged
feigeCode merged 1 commit into
feigeCode:mainfrom
keenser:terminal_scroll_keybindings
Oct 16, 2026
Merged

feigeCode merged 1 commit into
feigeCode:mainfrom
keenser:terminal_scroll_keybindings

Conversation

@keenser

@keenser keenser commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

Add keyboard shortcuts to scroll the terminal scrollback by lines and by pages:

  • Ctrl+Shift+Up / Ctrl+Shift+Down — scroll up/down one line
  • Shift+PageUp / Shift+PageDown — scroll up/down one page

The shortcuts are registered and refreshable in the terminal context and exposed in the Settings → Shortcuts tab. Page scrolling keeps one line of context to avoid losing orientation. The shortcuts deliberately do not occupy plain PageUp/PageDown or Shift+Up/Shift+Down, which remain available for shell/TUI input and history navigation.

In VI mode the new actions move the VI cursor, matching the existing mouse-wheel semantics; in alt-screen there is no scrollback, so the keys are propagated to the running program (vim, less, etc.) instead of being consumed.

How to Test

  1. Open a terminal tab and run a command that produces enough output to exceed the screen height.
  2. Press Ctrl+Shift+Up / Ctrl+Shift+Down and confirm the scrollback scrolls by one line each time.
  3. Press Shift+PageUp / Shift+PageDown and confirm scrolling by one page while keeping one line of context.
  4. Run a full-screen TUI program (e.g. vim, less, htop) and confirm the new shortcuts do not interfere with it (keys are passed through).

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

@feigeCode
feigeCode merged commit 6aa701b into feigeCode:main Oct 16, 2026
8 checks passed
ekovovo pushed a commit to ekovovo/navop that referenced this pull request Oct 19, 2026
- main/Cargo.toml、Cargo.lock:0.20.2 -> 0.20.3
- CHANGELOG.md:新增 v0.20.3 双语发布说明

本版自 v0.20.2 以来已合入 main 的变更:
- 终端按行 / 按屏滚动回看历史输出(feigeCode#409)
- Auto 模式 SQL 编辑器粘性会话,跨执行保留会话变量(feigeCode#312)
- 笔记 Markdown 大纲面板与代码字体设置(feigeCode#406)
- Redis:启用 TLS 修复、集群汇总全部 master、空库切换崩溃修复(feigeCode#414、feigeCode#416)
- SFTP:上传可立即取消、同连接 3 条并发车道、目录符号链接处理(feigeCode#417、feigeCode#418)
- 清空表刷新数据页签、结果集保存限定库名、剪贴板 JSON 原文复制(feigeCode#412、feigeCode#413)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants