Skip to content

Commit 7d26088

Browse files
committed
Add a fixme that I have no idea how to fix at the moment
1 parent c4a854d commit 7d26088

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ enum UpdateLocationStrategy {
312312
let caseConsiderCompletionPanel = {
313313
(completionPanelRect: CGRect) -> WidgetLocation.PanelLocation? in
314314
let completionPanelBelowCursor = completionPanelRect.minY >= selectionFrame.midY
315-
316315
switch (completionPanelBelowCursor, alignPanelTopToAnchor) {
317316
case (true, false), (false, true):
318317
// case: different position, place the suggestion as it should be
@@ -394,6 +393,9 @@ enum UpdateLocationStrategy {
394393
var firstLineRange: CFRange = .init()
395394
let foundFirstLine = AXValueGetValue(selectedRange, .cfRange, &firstLineRange)
396395
firstLineRange.length = 0
396+
397+
#warning("FIXME: When selection is too low and out of the screen, the selection range becomes something else.")
398+
397399
if foundFirstLine,
398400
let firstLineSelectionRange = AXValueCreate(.cfRange, &firstLineRange),
399401
let firstLineRect: AXValue = try? editor.copyParameterizedValue(
@@ -411,4 +413,3 @@ enum UpdateLocationStrategy {
411413
return selectionFrame
412414
}
413415
}
414-

0 commit comments

Comments
 (0)