Skip to content

Commit eff1245

Browse files
committed
review: Fix failures list menu
1 parent 386ab2c commit eff1245

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swattool/review.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ def _list_failures_menu(builds: list[swatbuild.Build],
9898
userinfos: userdata.UserInfos,
9999
entry: int) -> int:
100100
"""Allow the user to select the failure to review in a menu."""
101+
termsize = shutil.get_terminal_size((80, 20))
102+
width = termsize.columns - 2 # Borders
103+
101104
def preview_failure(fstr):
102105
fnum = int(fstr.split()[0])
103106
build = [b for (i, b) in enumerate(builds) if b.id == fnum][0]
104-
return build.format_description(userinfos[fnum])
107+
return build.format_description(userinfos[fnum], width)
105108

106109
shown_fields = [
107110
swatbuild.Field.BUILD,

0 commit comments

Comments
 (0)