console scroll easing

This commit is contained in:
robert dennis
2026-10-11 01:11:32 -04:00
parent 706d7ea5a9
commit cf956515d9
2 changed files with 10 additions and 0 deletions
@@ -171,6 +171,13 @@ describe('useTerminal', () => {
expect(Object.keys(theme)).toHaveLength(22);
});
it('scrolls without easing, so new output cannot drag a scrolled-up view along', async () => {
render(<Harness />);
await waitFor(() => expect(terminals).toHaveLength(1));
expect(terminals[0].options.smoothScrollDuration).toBe(0);
});
it('keeps the on-screen keyboard closed when the read-only terminal takes focus', async () => {
const { container } = render(<Harness />);
@@ -76,6 +76,9 @@ const terminalProps: ITerminalOptions = {
cursorBlink: false,
allowTransparency: true,
rows: 30,
// Ghostty eases wheel scrolls toward a target it doesn't move when output arrives, so on a busy
// console each new line dragged the view forward and swallowed most of the scroll.
smoothScrollDuration: 0,
};
const countLineFeeds = (data: string | Uint8Array) =>