Title: Add width awareness to fix wrapping of strings with full width chars by rybarczykj · Pull Request #839 · bpython/bpython · GitHub
Open Graph Title: Add width awareness to fix wrapping of strings with full width chars by rybarczykj · Pull Request #839 · bpython/bpython
X Title: Add width awareness to fix wrapping of strings with full width chars by rybarczykj · Pull Request #839 · bpython/bpython
Description: This is a redux of #731 which was put on hold until a need for width awareness was found. I'd say this is a decent justification for bringing it back Wrapping strings with fullwidth chars Here's the same string being typed before and after width awareness: New method to fix cursor position: When we put a 2-column character at the end of the line where there's only 1 column of room, curtsies adds a padding character (space) so we can kick it down to the line below. Therefore, in order to get the right cursor position, I had to add a method that determines how many padding chars there are (number_of_padding_chars_on_current_cursor_line). Note on this method: Right now, to determine the amount of padding, it calls display_linize, doubling the amount of times we call that function. It's definitely possible to keep track of this as a variable in the repl class instead, or to do some changes other to ensure less redundant work is done. Feedback appreciated. Runtime One of the barriers stopping us from implementing this before was runtime . I did not find any noticeable difference when pasting, printing, or moving my cursor around large strings.
Open Graph Description: This is a redux of #731 which was put on hold until a need for width awareness was found. I'd say this is a decent justification for bringing it back Wrapping strings with fullwidth chars Here&...
X Description: This is a redux of #731 which was put on hold until a need for width awareness was found. I'd say this is a decent justification for bringing it back Wrapping strings with fullwidth chars H...
Opengraph URL: https://github.com/bpython/bpython/pull/839
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:aa5f135f-275b-6605-c97c-c27228238f6f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CE2C:3F436F:C419EF:11184F7:6968DBBD |
| html-safe-nonce | 315360f8fad44ad6d06c447b872f41738e55e883713faebf1e1a166b5edd2638 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTJDOjNGNDM2RjpDNDE5RUY6MTExODRGNzo2OTY4REJCRCIsInZpc2l0b3JfaWQiOiIyNDUyMjk4MTE4NzE1NzI2NzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 15bd4514a7a69a4a6140c2b50c38b4802cec49241f2434a217e4a7176147de3b |
| hovercard-subject-tag | pull_request:463670430 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/bpython/bpython/pull/839/checks |
| twitter:image | https://avatars.githubusercontent.com/u/48132522?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/48132522?s=400&v=4 |
| og:image:alt | This is a redux of #731 which was put on hold until a need for width awareness was found. I'd say this is a decent justification for bringing it back Wrapping strings with fullwidth chars Here&... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3c4e9f2fc1db52c609205138be6a397cfde4574cb54d53015014de30dd49f27e |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fb1ea11f8c37dd4dd50347cca70d89824e93788 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width