Skip to content

Commit fd5c4aa

Browse files
committed
Update
1 parent e2dea79 commit fd5c4aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tool/Sources/FocusedCodeFinder/SwiftFocusedCodeFinder.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import ASTParser
22
import Foundation
3+
import Preferences
34
import SuggestionModel
45
import SwiftParser
56
import SwiftSyntax
6-
import Preferences
77

88
public struct SwiftFocusedCodeFinder: FocusedCodeFinder {
99
public let maxFocusedCodeLineCount: Int
@@ -61,7 +61,10 @@ public struct SwiftFocusedCodeFinder: FocusedCodeFinder {
6161
}
6262
}
6363
guard let focusedNode else {
64-
var result = UnknownLanguageFocusedCodeFinder(proposedSearchRange: 5)
64+
var result =
65+
UnknownLanguageFocusedCodeFinder(
66+
proposedSearchRange: maxFocusedCodeLineCount / 2
67+
)
6568
.findFocusedCode(
6669
containingRange: range,
6770
activeDocumentContext: activeDocumentContext

0 commit comments

Comments
 (0)