mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
Restore slim terminal scrollbar (xterm width: 7) (#5051)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -76,8 +76,11 @@ describe('buildDefaultTerminalOptions', () => {
|
||||
expect(buildDefaultTerminalOptions().cursorInactiveStyle).toBe('outline')
|
||||
})
|
||||
|
||||
it('does not reserve a classic scrollbar gutter when fitting terminal columns', () => {
|
||||
expect(buildDefaultTerminalOptions().scrollbar?.width).toBe(0)
|
||||
it('shows the slim xterm scrollbar in its reserved gutter', () => {
|
||||
// Why: 7px gutter is an accepted ~1-column cost (VS Code reserves 14);
|
||||
// the v1.4.51 table corruption that once forced width 0 was the ZWJ
|
||||
// width bug, fixed separately by the Orca unicode provider.
|
||||
expect(buildDefaultTerminalOptions().scrollbar?.width).toBe(7)
|
||||
})
|
||||
|
||||
it('only uses inactive outline for block cursors', () => {
|
||||
|
||||
@@ -32,9 +32,14 @@ export function buildDefaultTerminalOptions(): ITerminalOptions {
|
||||
macOptionClickForcesSelection: true,
|
||||
drawBoldTextInBrightColors: true,
|
||||
scrollbar: {
|
||||
// Why: xterm's DOM scrollbar overlays the terminal in Electron; reserving
|
||||
// gutter width in FitAddon underfits wide table/TUI output by a column.
|
||||
width: 0
|
||||
// Why: slim VS Code-style scrollbar (VS Code uses 14). FitAddon reserves
|
||||
// this as a gutter, costing ~1 column per pane — accepted tradeoff so the
|
||||
// scrollbar never covers content (evidence in PR #5051). The v1.4.51
|
||||
// table corruption #4877 fixed by zeroing this was actually the ZWJ
|
||||
// width bug; it stays fixed by pane-terminal-unicode-provider.ts. Width
|
||||
// also enables the overview ruler, whose border is hidden in
|
||||
// composeActiveTerminalTheme.
|
||||
width: 7
|
||||
},
|
||||
// Why: advertise kitty keyboard protocol support so CLIs that probe
|
||||
// (CSI ? u) know Orca accepts enhanced key reporting. Orca still writes
|
||||
|
||||
Reference in New Issue
Block a user