Skip to content

Commit eaab81e

Browse files
35C4n0rCopilot
andauthored
Update lib/msgfmt/message_box.go
Co-authored-by: Copilot <[email protected]>
1 parent 9e874f3 commit eaab81e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/msgfmt/message_box.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,9 @@ func removeCodexMessageBox(msg string) string {
7979
}
8080
}
8181

82-
return strings.Join(lines[messageBoxStartIdx:max(0, messageBoxEndIdx)], "\n")
82+
if messageBoxEndIdx > messageBoxStartIdx {
83+
return strings.Join(lines[messageBoxStartIdx:max(0, messageBoxEndIdx)], "\n")
84+
}
85+
86+
return strings.Join(lines, "\n")
8387
}

0 commit comments

Comments
 (0)