@@ -54,7 +54,6 @@ final class SQLEditorCoordinator: TextViewCoordinator, TextViewDelegate {
5454
5555 func scheduleEditorFocusClaim( ) {
5656 focusClaimPending = true
57- Self . logger. debug ( " Editor focus claim armed " )
5857 }
5958
6059 /// Vim mode for UI observation
@@ -119,18 +118,12 @@ final class SQLEditorCoordinator: TextViewCoordinator, TextViewDelegate {
119118 EditorEventRouter . shared. register ( self , textView: textView)
120119
121120 if !self . isDestroyed, let window = textView. window {
122- let claimPending = self . focusClaimPending
123- let responderName = window. firstResponder. map { String ( describing: type ( of: $0) ) } ?? " nil "
124- var made = false
125- if claimPending {
121+ if self . focusClaimPending {
126122 self . focusClaimPending = false
127- made = window. makeFirstResponder ( textView)
123+ window. makeFirstResponder ( textView)
128124 } else if window. firstResponder == nil || window. firstResponder === window {
129- made = window. makeFirstResponder ( textView)
125+ window. makeFirstResponder ( textView)
130126 }
131- Self . logger. debug ( " Editor focus claim: pending= \( claimPending) isKey= \( window. isKeyWindow) responderBefore= \( responderName, privacy: . public) made= \( made) " )
132- } else {
133- Self . logger. debug ( " Editor focus claim skipped: hasWindow= \( textView. window != nil ) destroyed= \( self . isDestroyed) pending= \( self . focusClaimPending) " )
134127 }
135128 if controller. cursorPositions. isEmpty {
136129 controller. setCursorPositions ( [ CursorPosition ( range: NSRange ( location: 0 , length: 0 ) ) ] )
0 commit comments