diff options
| author | Stefan Boberg <[email protected]> | 2026-05-04 15:04:54 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-05-04 15:04:54 +0200 |
| commit | 03bac7c302eaa5a335b2162a5a0d59c30d3b6f49 (patch) | |
| tree | 8cefbf680fe85f839bbd69a9ea37cdbe20063f34 /thirdparty/raw_pdb/src/PDB_ModuleSymbolStream.cpp | |
| parent | zen CLI: project-* commands → 'project <sub>' subcommands (#1026) (diff) | |
| download | zen-03bac7c302eaa5a335b2162a5a0d59c30d3b6f49.tar.xz zen-03bac7c302eaa5a335b2162a5a0d59c30d3b6f49.zip | |
Tui picker fixes (#1027)
- **Viewport scrolling.** Cap rendered rows to the visible terminal height and track a scroll offset that follows the selection, so long lists no longer overflow the screen and corrupt the cursor-up redraw. Hint shows `[i/N]` when the list exceeds the viewport.
- **Single-write frame rendering.** Each frame is built into one `ExtendableStringBuilder` and emitted via `TuiWrite`. On Windows, `TuiWrite` routes through `WriteConsoleW` when stdout is a console, so a frame is one syscall instead of one per `printf` — eliminates the visible per-character repaint.
- **All `consoletui` helpers go through `TuiWrite`.** `TuiCursorHome`, `TuiSetScrollRegion`, `TuiResetScrollRegion`, `TuiMoveCursor`, `TuiSaveCursor`, `TuiRestoreCursor`, `TuiEraseLine`, `TuiShowCursor`, and the alternate-screen enter/exit pair now bypass the CRT on Windows consoles, matching the picker. `TuiFlush` remains an unconditional `fflush(stdout)` so callers that mixed `printf` output earlier in a sequence still drain correctly.
- **Width detection fix.** `TuiConsoleColumns` now reports the visible window width rather than the screen-buffer width, so labels sized to it don't wrap on legacy cmd.exe configs where the buffer is wider than the window.
- **PgUp / PgDn.** Jump by one viewport, clamped to the list ends. `VK_PRIOR` / `VK_NEXT` on Windows; `ESC[5~` / `ESC[6~` on POSIX.
- **Terminal resize handling.** Enable `ENABLE_WINDOW_INPUT` on stdin (Windows) and install a `SIGWINCH` handler without `SA_RESTART` (POSIX) so the blocking key read returns a new `ConsoleKey::Resize`. The picker recomputes viewport/label budgets, clears the visible screen, and redraws as a fresh first frame; pre-picker output stays in scrollback.
- **Centralized label truncation.** The picker truncates item labels to fit the current terminal width (cols minus the 3-column indicator), walking back to a UTF-8 codepoint boundary so multi-byte sequences are never split. The hand-rolled width-aware truncation in `history_cmd::BuildLabel` and `ui_cmd` is removed; callers hand the picker the full label and let it clip.
Diffstat (limited to 'thirdparty/raw_pdb/src/PDB_ModuleSymbolStream.cpp')
0 files changed, 0 insertions, 0 deletions