-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
gh-146044: Fix ctrl-w (unix-word-rubout) to use whitespace word boundaries #146174
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
678eefd
853cb8c
99023b2
e6d27d9
9f54090
140faf1
c8d1759
0a25f0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -358,6 +358,34 @@ def test_setpos_from_xy_for_non_printing_char(self): | |||||||||
| reader.setpos_from_xy(8, 0) | ||||||||||
| self.assertEqual(reader.pos, 7) | ||||||||||
|
|
||||||||||
| def test_bow_ws_stops_at_whitespace(self): | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are the existing tests for bow()? id there are some, please put those tests next to them |
||||||||||
| # See https://github.com/python/cpython/issues/146044 | ||||||||||
|
||||||||||
| # See https://github.com/python/cpython/issues/146044 | |
| # See https://github.com/python/cpython/issues/146044. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the index() method to get the index of )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests with \n and ensure that you also properly jump lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.assertEqual(reader.bow_ws(), 4) | |
| self.assertEqual(reader.bow_ws(), 4) | |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove those extra blanks
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Fix ``unix-word-rubout`` (Ctrl-W) in the REPL to use whitespace-only word | ||
| boundaries, matching behavior of the basic REPL. Previously it used | ||
| syntax-table boundaries which treated punctuation as word separators. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.