File tree Expand file tree Collapse file tree
Core/Sources/SuggestionWidget/SuggestionPanelContent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,8 +283,8 @@ struct CodeBlockSuggestionPanel: View {
283283 range. start = . init( line: 0 , character: range. start. character)
284284 let codeInRange = EditorInformation . code ( in: suggestion. replacingLines, inside: range)
285285 let leftover = {
286- if range. end. line >= 0 , range. end. line < textCursorTracker . content . lines . endIndex {
287- let lastLine = textCursorTracker . content . lines [ range. end. line]
286+ if range. end. line >= 0 , range. end. line < suggestion . replacingLines . endIndex {
287+ let lastLine = suggestion . replacingLines [ range. end. line]
288288 if range. end. character < lastLine. utf16. count {
289289 let startIndex = lastLine. utf16. index (
290290 lastLine. utf16. startIndex,
@@ -301,7 +301,7 @@ struct CodeBlockSuggestionPanel: View {
301301 } ( )
302302
303303 let prefix = {
304- if range. start. line >= 0 , range. start. line < textCursorTracker . content . lines . endIndex {
304+ if range. start. line >= 0 , range. start. line < suggestion . replacingLines . endIndex {
305305 let firstLine = suggestion. replacingLines [ range. start. line]
306306 if range. start. character < firstLine. utf16. count {
307307 let endIndex = firstLine. utf16. index (
You can’t perform that action at this time.
0 commit comments