-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
bpo-37903: IDLE: Shell sidebar with prompts (take #2) #22682
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
terryjreedy
merged 68 commits into
python:master
from
taleinat:idle-shell-sidebar-take2
Apr 28, 2021
Merged
Changes from 59 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
7adb9ad
initial working shell sidebar
taleinat 26bbaec
fix recall and handling of prompt and input lines
taleinat 9076da5
update only as needed during editing, accounting for line wrapping
taleinat cad2cd1
properly insert delegators into their proper place in the percolator
taleinat 4040e26
move non-syntax tag highlighting out of ColorDelegator
taleinat 9b31031
replace shell sidebar prompt and input line recognition method
taleinat 37a0db3
minor code cleanup
taleinat c766822
remove unnecessary .replace() delegator method
taleinat 50bd082
fix inverted condition in deciding whether to update sidebar (oops!)
taleinat 6f186f0
fix "stdin" tag removed when undo-ing a deletion
taleinat f7f3de9
fix sidebar update on new prompt
taleinat e929ea7
add a NEWS entry
taleinat d04bfa3
fix recall handling with multiple successive statements
taleinat 81f4852
remove a dead line
taleinat 46be85e
remove commented out initial attempt
taleinat 1fc4bcb
update shell sidebar font upon font config changes
taleinat 6f1c975
update sidebar text colors upon highlight config changes
taleinat 083fede
use the prompt ("console") foreground color for the shell sidebar text
taleinat 4ad72a1
show continuation prompts ("...") for multi-line history recall
taleinat 009e08d
show continuation prompts ("...") after multi-line replace in the shell
taleinat e524cce
show continuation prompts ("...") after multi-line undo/redo in the s…
taleinat 3ea2986
don't show continuation prompts ("...") for print() outputs
taleinat 7f9182f
allow deleting ">>> " at the beginning of a line in shell windows
taleinat 10aaf1d
update shell sidebar on shell output squeeze/unsqueeze
taleinat 7c91901
remove failing editor window test that is no longer relevant
taleinat 50ca9c6
add several tests for the shell sidebar
taleinat 23c218f
reduce shell sidebar test run time by reusing the PyShell
taleinat 6cef0a9
revert removal of the "hit" tag from Colorizer.tag_defs
taleinat a018135
hide unnecessary extra "root" Tk window in tests
taleinat 525fe44
fix test method names
taleinat 7b8913d
fix test comments according to pep-8 style
taleinat 8c8d0c0
rename sidebar test class according to convention
taleinat 7ecc843
re-word doc-strings for BaseSideBar and EndLineDelegator
taleinat bedb1cb
re-word doc-strings for get_lineno and get_end_linenumber
taleinat eee0453
optimize tests and make them more robust
taleinat 7afcb57
handle mouse buttons except for button 1 (left-click)
taleinat 8a7dd60
add tests for text font and color configs
taleinat 6efb968
remove show/hide_sidebar from the shell sidebar
taleinat cc37924
add more test cases
taleinat 97576da
update coverage percentage
taleinat 2aa4e1a
re-word squeeze_current_text() doc-string
taleinat 71f343e
update coverage percentage
taleinat 45e66a5
Merge branch 'master' into idle-shell-sidebar
taleinat dbe931c
fix wrong colors at ends of input lines/blocks
taleinat 779adc4
fix some sidebar tests affected by losing window focus
taleinat 8f81915
fix highlighting and sidebar prompts after syntax errors
taleinat ddc0026
better long-term disabling of line numbers tests
taleinat d1e0d32
update unittest coverage percentage
taleinat 0516db9
run sidebar tests with PyShell without a sub-process
taleinat afa6669
avoid creating text widgets for whitespace shell prompts
taleinat 9d06f26
simplify some test code
taleinat 73146fb
remove unnecessary parentheses
taleinat 19b16a4
fix first prompt when shown text starts with the end of a wrapped line
taleinat ecab884
fix failing tests on Azure Devops
taleinat 7b2d9dc
Merge remote-tracking branch 'upstream/master' into pr_22682
terryjreedy d6e35cc
Merge remote-tracking branch 'upstream/master' into pr_22682
terryjreedy f6c9a7c
revert indentation change
taleinat 990cef4
revert InteractiveInterpreter.runsource return values
taleinat e86353b
fix removal of final newline and surrounding whitespace
taleinat a1891a4
simplify fixed newline+whitespace removal using \Z
taleinat 3e52c5d
revert unneeded changes to ResetColorizer
taleinat cc709ab
wrap some overly long lines of code
taleinat 093544a
fix tests failing on Azure Pipelines
taleinat 474c11a
rename and refactor Tk mainloop function decorator
taleinat fde793a
simplify code by making use_subprocess default to False
taleinat 916e0d3
rename "*_command" -> "*_statement"
taleinat 8ada0a7
improve test with squeezer
taleinat c1871f2
fix missed renaming of update_colors() back to ResetColorizer()
taleinat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This appears to be an unrelated refactoring that should have been and should be a separate issue and review. The effect is to call color_config before instead of after self._addcolorizer. Assuming that this is an improvement, which should be tested or explained in the separate issue, this can be done without splitting into two functions.
While being edited, change the name to reset_colorizer or maybe better reset_colors.
The existing calls are the ones in configdialog and editor.init, which are changed in this patch, and the one in editor.filename_change_hook, which is not. So the other effect is to avoid calling color_config, and maybe code_context and line_numbers updates on a name change. But code_context should be updated. Besides which, name changes so extremely rare that avoiding a bit of unneeded work is not, to me, worth adding a function.
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.
Yes, you're right. I'll make the changes you suggest in a separate PR.
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.
I've reverted this change. It is no longer necessary given the addition of
Percolator.insertfilterafter().(No other PR is necessary, other than for cleanup and renaming, which I'm going to postpone for now.)