Skip to content

Commit 3119c2e

Browse files
Add screen height and width updating at Reader.refresh and remove redundant UnixConsole line
1 parent 9343518 commit 3119c2e

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Lib/_pyrepl/reader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ def update_screen(self) -> None:
644644

645645
def refresh(self) -> None:
646646
"""Recalculate and refresh the screen."""
647+
self.console.height, self.console.width = self.console.getheightwidth()
647648
# this call sets up self.cxy, so call it first.
648649
self.screen = self.calc_screen()
649650
self.console.refresh(self.screen, self.cxy)

Lib/_pyrepl/unix_console.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,6 @@ def __move_tall(self, x, y):
776776
self.__write_code(self._cup, y - self.__offset, x)
777777

778778
def __sigwinch(self, signum, frame):
779-
self.height, self.width = self.getheightwidth()
780779
self.event_queue.insert(Event("resize", None))
781780

782781
def __hide_cursor(self):

0 commit comments

Comments
 (0)