We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b967471 commit 045dd42Copy full SHA for 045dd42
1 file changed
Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanel.swift
@@ -241,7 +241,10 @@ struct CodeBlockSuggestionPanel: View {
241
lastLine.utf16.startIndex,
242
offsetBy: range.end.character
243
)
244
- let leftover = String(lastLine.utf16.suffix(from: startIndex))
+ var leftover = String(lastLine.utf16.suffix(from: startIndex))
245
+ if leftover?.last?.isNewline ?? false {
246
+ leftover?.removeLast(1)
247
+ }
248
return leftover ?? ""
249
}
250
0 commit comments