Skip to content

Commit 76456be

Browse files
committed
fix wrapWithFormat
1 parent 23b15ef commit 76456be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/prompts/src/note.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const wrapWithFormat = (message: string, width: number, format: NoteOptions["for
2323
const wrapMsg = wrapAnsi(message, width).split("\n");
2424
const maxWidthNormal = wrapMsg.reduce((sum, ln) => Math.max(strip(ln).length, sum), 0);
2525
const maxWidthFormat = wrapMsg.map(format).reduce((sum, ln) => Math.max(strip(ln).length, sum), 0);
26-
const wrapWidth = maxWidthNormal - (maxWidthFormat - maxWidthNormal);
26+
const wrapWidth = width - (maxWidthFormat - maxWidthNormal);
2727
return wrapAnsi(message, wrapWidth);
2828
}
2929

0 commit comments

Comments
 (0)