| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 78ead4c commit 2308a61
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -367,7 +367,7 @@ def __init__( | |||
| 367 | 367 | self._current_line = "" | |
| 368 | 368 | ||
| 369 | 369 | # current line of output - stdout and stdin go here | |
| 370 | - self.current_stdouterr_line = "" | ||
| 370 | + self.current_stdouterr_line = "" # Union[str, FmtStr] | ||
| 371 | 371 | ||
| 372 | 372 | # this is every line that's been displayed (input and output) | |
| 373 | 373 | # as with formatting applied. Logical lines that exceeded the terminal width | |
@@ -1582,8 +1582,18 @@ def move_screen_up(current_line_start_row): | |||
| 1582 | 1582 | current_line_height = current_line_end_row - current_line_start_row | |
| 1583 | 1583 | ||
| 1584 | 1584 | if self.stdin.has_focus: | |
| 1585 | + logger.debug( | ||
| 1586 | + "stdouterr when self.stdin has focus: %r %r", | ||
| 1587 | + type(self.current_stdouterr_line), | ||
| 1588 | + self.current_stdouterr_line, | ||
| 1589 | + ) | ||
| 1590 | + stdouterr_width = ( | ||
| 1591 | + self.current_stdouterr_line.width | ||
| 1592 | + if isinstance(self.current_stdouterr_line, FmtStr) | ||
| 1593 | + else wcswidth(self.current_stdouterr_line) | ||
| 1594 | + ) | ||
| 1585 | 1595 | cursor_row, cursor_column = divmod( | |
| 1586 | - wcswidth(self.current_stdouterr_line) | ||
| 1596 | + stdouterr_width | ||
| 1587 | 1597 | + wcswidth( | |
| 1588 | 1598 | self.stdin.current_line, max(0, self.stdin.cursor_offset) | |
| 1589 | 1599 | ), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments