Skip to content

Commit 1879466

Browse files
committed
wip
1 parent 192cbea commit 1879466

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/msgfmt/message_box.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ func removeOpencodeMessageBox(msg string) string {
7070
// ┃ ┃
7171
// We only check for the first ┃ and then an empty line above it - as sometimes the full input block does not load within a snapshot,
7272
// this leads to displaying a bunch of newlines.
73-
for i := len(lines) - 1; i >= 1; i-- {
74-
if strings.TrimSpace(lines[i-1]) == "" &&
75-
strings.ReplaceAll(lines[i], " ", "") == "┃┃" {
73+
for i := len(lines) - 2; i >= 1; i-- {
74+
if strings.ReplaceAll(lines[i-1], " ", "") == "┃┃" &&
75+
strings.ReplaceAll(lines[i+1], " ", "") == "┃┃" &&
76+
strings.ReplaceAll(lines[i], " ", "") == "┃>┃" {
7677
lines = lines[:i-1]
7778
break
7879
}

0 commit comments

Comments
 (0)