]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324) (#123327)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Aug 2024 01:13:36 +0000 (03:13 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2024 01:13:36 +0000 (02:13 +0100)
commit865bfb1530f377d719cb9d68b4538a19b82922d3
treee964f3eb0f5f9a1642d3ae774e3d5db0aedb2eb8
parent48173655812396500159148c9521dc4dd74782fa
[3.13] gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324) (#123327)

gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324)

When display lines above the cursor come from the cache, the first line
to not come from the cache may be a wrapped line, starting half way
through a logical line in the buffer. Detect and handle this case to
avoid accidentally drawing a stray prompt in the middle of a logical
line.
(cherry picked from commit 602fcf97df1665538d4e9841f9dc6bc33e38bece)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
Lib/_pyrepl/reader.py
Lib/test/test_pyrepl/test_reader.py
Misc/NEWS.d/next/Core_and_Builtins/2024-08-25-18-27-49.gh-issue-123177.yLuyqE.rst [new file with mode: 0644]