native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #229 from onevcat/fix/canvas-tui-scroll-regression

Revert canvas no-scrollback scroll passthrough

authored by

Wei Wang and committed by
GitHub
66633fc0 03da4511

-22
-22
supacode/Infrastructure/Ghostty/GhosttySurfaceView.swift
··· 924 924 925 925 override func scrollWheel(with event: NSEvent) { 926 926 guard let surface else { return } 927 - 928 - // In canvas mode, if the terminal has no scrollback content the scroll 929 - // event is useless here. Let it bubble up to the canvas container so 930 - // two-finger gestures pan the canvas instead of being swallowed. 931 - if scrollWrapper?.hostKind == .canvas, !hasScrollbackContent { 932 - scrollWrapper?.forwardScrollToParent(with: event) 933 - return 934 - } 935 - 936 927 var scrollX = event.scrollingDeltaX 937 928 var scrollY = event.scrollingDeltaY 938 929 if event.hasPreciseScrollingDeltas { ··· 940 931 scrollY *= 2 941 932 } 942 933 ghostty_surface_mouse_scroll(surface, scrollX, scrollY, scrollMods(for: event)) 943 - } 944 - 945 - private var hasScrollbackContent: Bool { 946 - guard let lastScrollbar else { return false } 947 - return lastScrollbar.total > lastScrollbar.length 948 934 } 949 935 950 936 override func pressureChange(with event: NSEvent) { ··· 2594 2580 func updateScrollbar(total: UInt64, offset: UInt64, length: UInt64) { 2595 2581 scrollbar = ScrollbarState(total: total, offset: offset, length: length) 2596 2582 synchronizeScrollView() 2597 - } 2598 - 2599 - /// Forward a scroll event to the parent responder chain, bypassing the 2600 - /// internal NSScrollView which would otherwise consume it. Used in 2601 - /// canvas mode when the terminal has no scrollback content so the event 2602 - /// can reach CanvasScrollContainerView for canvas panning. 2603 - func forwardScrollToParent(with event: NSEvent) { 2604 - super.scrollWheel(with: event) 2605 2583 } 2606 2584 2607 2585 func refreshAppearance() {