- if self.current_card().side == 0:
- top = num_done + " | " + self.headers[self.current_card().side]
- else:
- top = (
- num_done
- + " | "
- + self.headers[self.current_card().side]
- + ' | "'
- + str(self.current_card().front)
- + '"'
+
+ if self.view == 1:
+ """
+ Display the contents of the card.
+ Shows a header, a horizontal line, and the contents of the current
+ side.
+ """
+ # If on the back of the card, show the content of the front side in
+ # the header
+ if self.current_card().side == 0:
+ top = num_done + " | " + self.headers[self.current_card().side]
+ else:
+ top = (
+ num_done
+ + " | "
+ + self.headers[self.current_card().side]
+ + ' | "'
+ + str(self.current_card().front)
+ + '"'
+ )
+
+ self.win.addstr(
+ 0,
+ 0,
+ textwrap.shorten(top, width=mcols - 20, placeholder="…"),
+ curses.A_BOLD,