From fd98370211d5e1657a3430dde5ca1c59cb5f92ab Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:51:19 +0200 Subject: [PATCH] macOS: fix swiftlint --- macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift index fe2a7730a..9c7c5edea 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -301,15 +301,14 @@ extension Ghostty { guard let self else { return false } return notification.object as AnyObject? === self } - .map { + .map { _ in // Debounce retains its latest upstream value. In this // case its a Notification, which retains its object, // which is a surface. So this creates a retain cycle. // This discards the notification before debounce. - _ in () } .debounce(for: .milliseconds(100), scheduler: DispatchQueue.main) - .sink { [weak self] _ in + .sink { [weak self] in guard let self else { return } NSAccessibility.post(element: self, notification: .selectedTextChanged) }