We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66ccada commit 5b40449Copy full SHA for 5b40449
1 file changed
Core/Sources/Service/Workspace.swift
@@ -80,11 +80,17 @@ final class Filespace {
80
}
81
82
let editingLine = lines[cursorPosition.line].dropLast(1) // dropping \n
83
- let suggestionFirstLine = presentingSuggestion?.text.split(separator: "\n").first ?? ""
+ let suggestionLines = presentingSuggestion?.text.split(separator: "\n") ?? []
84
+ let suggestionFirstLine = suggestionLines.first ?? ""
85
if !suggestionFirstLine.hasPrefix(editingLine) {
86
reset()
87
return false
88
89
+
90
+ if editingLine == suggestionFirstLine, suggestionLines.count <= 1 {
91
+ reset()
92
+ return false
93
+ }
94
95
if editingLine.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
96
0 commit comments