Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-124927: Fix conversion issue between coordinates and position in REPL #125001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
gh-124927: Fix conversion issue between coordinates and position in REPL
  • Loading branch information
ImFeH2 committed Feb 21, 2025
commit 233c798954dee780551c102b9e87a2e2b7e9b71c
2 changes: 1 addition & 1 deletion Lib/_pyrepl/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def setpos_from_xy(self, x: int, y: int) -> None:
cur_x = self.screeninfo[i][0]
while cur_x < x:
if self.screeninfo[i][1][j] == 0:
j += 1 # prevent infinite loop
j += 1 # prevent potential future infinite loop
continue
cur_x += self.screeninfo[i][1][j]
j += 1
Expand Down
Loading