Skip to content

Commit 09b35a4

Browse files
committed
feat: better code formatting
1 parent 052e516 commit 09b35a4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/msgfmt/message_box.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func removeCodexMessageBox(msg string) string {
6666
// We reached the start of the message box (we don't want to show this line), also exit the loop
6767
if strings.Contains(lines[i], "╭") && strings.Contains(lines[i], "───────╮") {
6868
// We only want this to be i + 1 in case the top of the box is visible
69-
messageBoxStartIdx = i + 1
69+
messageBoxStartIdx = i
7070
break
7171
}
7272

@@ -81,16 +81,11 @@ func removeCodexMessageBox(msg string) string {
8181
}
8282
}
8383

84-
// If we didn't find messageBoxStartIdx, set it to 0
85-
if messageBoxStartIdx == -1 {
86-
messageBoxStartIdx = 0
87-
}
88-
8984
// If we didn't find messageBoxEndIdx, set it to the end of the lines
9085
if messageBoxEndIdx == -1 {
91-
messageBoxEndIdx = len(lines) - 1
86+
messageBoxEndIdx = len(lines)
9287
}
9388

94-
return strings.Join(lines[messageBoxStartIdx:messageBoxEndIdx], "\n")
89+
return strings.Join(lines[messageBoxStartIdx+1:messageBoxEndIdx], "\n")
9590

9691
}

0 commit comments

Comments
 (0)