We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8692e74 commit 635c70eCopy full SHA for 635c70e
Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift
@@ -353,8 +353,10 @@ struct WindowBaseCommandHandler: SuggestionCommandHandler {
353
guard var selection = editor.selections.last,
354
selection.start != selection.end
355
else { return ("", .cursor(editor.cursorPosition)) }
356
- // always start from char 0 so that it can keep the indentation.
357
- selection.start = .init(line: selection.start.line, character: 0)
+ if selection.start.line != selection.end.line {
+ // when there are multiple lines start from char 0 so that it can keep the indentation.
358
+ selection.start = .init(line: selection.start.line, character: 0)
359
+ }
360
return (
361
editor.selectedCode(in: selection),
362
.init(
0 commit comments