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
Idle: conflict between loop execution and undo shortcut. #67804
Comments
Keeping pressed the undo shortcut during a cycle until returning to the cycle declaration, IDLE will react deleting the declaration [1] or overlaying it on the result/s [2] ([2] intermittently and un-effectively on cycle execution). |
(Duplicate message unlinked). I do not know what you mean by a 'cycle', 'generic cycle', or 'cycle declaration'. Python's only declarations are global and nonlocal statements. The image does not help me except to specify OSX (latest version) an 3.4.2. Please describe what you actually did in enough detail that I could do the same. What is the undo shortcut on OSX, or specifically your machine? |
Sorry for my bad technical acknowledgment, i will try to be more understandable. |
I believe you are reporting the following behavior, which I believe I have seen before but which seems not to be the subject of a tracker issue. If I run import time
for i in range(20):
print(i)
time.sleep(.5) either in Shell at >>> or from the editor, and hold Undo (^Z for me on Windows), output is deleted back to the previous >>>. When the statements are enter in Shell, that means erasing the visible 'for' statement. A bit to my surprise, <> (alt-P for me) still reloads the 'for' statement. While this behavior is entirely avoidable by users (don't hit Undo after Enter), I agree that it is not desirable. At minimum, it should be possible to clear the undo buffer when code is submitted for execution, just as it is when >>> is printed. That should prevent removal of the entered statement. I believe Undo is left active during execution so it will be active during user entry in response to input('prompt'). Also, one can start entering input before 'prompt' is printed. So avoiding adding output to Undo would be trickier. -- |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: