Title: IDLE: fix Shell context menu copy-with-prompts bug · Issue #95511 · python/cpython · GitHub
Open Graph Title: IDLE: fix Shell context menu copy-with-prompts bug · Issue #95511 · python/cpython
X Title: IDLE: fix Shell context menu copy-with-prompts bug · Issue #95511 · python/cpython
Description: If one selects whole lines, as the sidebar makes easy, the next line, if any, is also copied. If the next screen line has a '>>>' prompt with no input, the prompt is added anyway. Given 3 selected lines followed by a prompt, >>> if 1: pr...
Open Graph Description: If one selects whole lines, as the sidebar makes easy, the next line, if any, is also copied. If the next screen line has a '>>>' prompt with no input, the prompt is added anyway. Given 3 selected ...
X Description: If one selects whole lines, as the sidebar makes easy, the next line, if any, is also copied. If the next screen line has a '>>>' prompt with no input, the prompt is added anyway. ...
Opengraph URL: https://github.com/python/cpython/issues/95511
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IDLE: fix Shell context menu copy-with-prompts bug","articleBody":"If one selects whole lines, as the sidebar makes easy, the next line, if any, is also copied. If the next screen line has a '>>>' prompt with no input, the prompt is added anyway. Given 3 selected lines followed by a prompt,\n```\n>>> if 1: print 2\n... \n 2\n>>> |\n```\n`Copy` copies exactly those 3 lines. `Copy with Prompts` should only add prompts for those 3 lines and not add the second primary prompt, whether or not followed by any test. \n\nThe solution is to test sel.last and only move it to the beginning of the next line when it is not already at the beginning of a line or potential line, as it is above.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-95512\n* gh-95519\n* gh-95520\n* \u003c!-- /gh-linked-prs -->","author":{"url":"https://github.com/terryjreedy","@type":"Person","name":"terryjreedy"},"datePublished":"2022-08-01T02:05:03Z","url":"https://github.com/python/cpython/issues/95511"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a82e3f57-8436-8d09-cbe9-8b3f7da78828 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9612:1148D3:39AD9B7:49909A7:6B020297 |
| html-safe-nonce | 8c4ed38fb0d7fe15dab8462424f2122fd8f983c7b29aa8551c3793b042cf535e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjEyOjExNDhEMzozOUFEOUI3OjQ5OTA5QTc6NkIwMjAyOTciLCJ2aXNpdG9yX2lkIjoiMzI0OTk0NDk4MzgwMDc3NTMxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1f54515dbf752a6dff35814e1d430b0fcf29ab40214515838c00e65dfa7da035 |
| hovercard-subject-tag | issue:1323692973 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/95511/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76e441012cae30ac2c30d9716deeaa98ecb75f2a3cd4eca67e130c70ab8d8375/python/cpython/issues/95511 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76e441012cae30ac2c30d9716deeaa98ecb75f2a3cd4eca67e130c70ab8d8375/python/cpython/issues/95511 |
| og:image:alt | If one selects whole lines, as the sidebar makes easy, the next line, if any, is also copied. If the next screen line has a '>>>' prompt with no input, the prompt is added anyway. Given 3 selected ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | terryjreedy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width