| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
|
||
| def cut(self,event): | ||
| if not self.text.tag_ranges('sel'): | ||
| self.text.tag_add('sel', 'insert linestart', 'insert+1l linestart') |
There was a problem hiding this comment.
Would this work with multiple empty lines between 2 meaningful lines?
[and same comment for the copy action]
Sorry, something went wrong.
There was a problem hiding this comment.
If the cursor is on an empty line, after my patch, pressing Ctrl-C will copy this empty line, so it is '\n'.
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you. Moving the cursor to the start of the line is right (Ctrl-C Ctrl-V then duplicates the line), but the line must not be selected: after this patch the next typed character replaces the whole line. Put the line on the clipboard directly instead of selecting it: text.clipboard_clear(); text.clipboard_append(text.get('insert linestart', 'insert+1line linestart')). For cut, do the same and then delete the line with text.delete().
Please also add a test in idle_test/test_editor.py (clipboard content, no selection, cursor at the line start, line deleted for cut) and update the Cut and Copy entries in Doc/library/idle.rst.
Ctrl-C in the Shell still interrupts, since the interrupt binding runs first when there is no selection.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
Why can't this line be selected? After pressing Ctrl-C, the line will be selected and copied. Isn't it more intuitive for users to know that the copied part is the selected line? This is just my opinion, and I wanted to discuss it with you. I’ll complete the test case after a while. |
Sorry, something went wrong.
|
If it remains selected after copying, then pressing any character key will remove it. Pressing Ctrl-V will replace it with itself, which is less useful than duplicating. |
Sorry, something went wrong.
|
I may not accept the issue, but have spent my time on many other issues. |
Sorry, something went wrong.
|
@serhiy-storchaka I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @serhiy-storchaka: please review the changes made to this pull request. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you, this works as expected now. I like this feature, but whether to add it is up to @terryjreedy.
Please use the NEWS wording suggested by @aisk.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When the selection is empty, pressing Ctrl-C/Ctrl-X would copy text of zero length, which seems make no sense, and probably cause mistakes (e.g. forgot copy a zero-length text). Therefore, I modified the behavior to copy the current line when there is no selection, which supported by some other editors.