def truncate_body(self):
        height, width = self.window_size()

        # truncate lines horizontally
        lines = []
        for line in self.fmt_body.split('\n'):
            s = AnsiString(line)
            if len(s) > width:
                line = s[:1-width] + self.colour('>', 'red')
            lines.append(line)

        # truncate body vertically
        if len(lines) > self.body_height():
            if self.trunc_top:
                lines = lines[len(lines) - self.body_height():]
            else:
                lines = lines[:self.body_height()]

        self.fmt_body = '\n'.join(lines)
dataset/ETHPy150Open snare/voltron/voltron/view.py/TerminalView.truncate_body/swapped operands of `-`