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
Shift+Click selection starts from last mouse click instead of cursor position #2639
Comments
Thank you for this thorough report and sorry for the late reply! I could reproduce this, but I'm afraid the problem is in the UI widget I've used, so it is not straightforward to fix. I'm considering moving to a new UI toolkit, so I'll postpone this issue for now. |
Investigating this a bit and I found something that could solve this while keeping tk: https://wiki.tcl-lang.org/page/Modern+Bindings+for+the+Text+Widget. Will investigate more and see if I can get this to work somehow. |
Managed to get it to work! Obviously this needs more testing to check for other side effects (maybe an experimental option?). Because I don't know Tcl I wanted to avoid rewriting |
If someone wants to try this locally for the 4.0.2 release, look for |
Thanks @mrexodia for taking a crack at this. I tried it out, it loaded up under 4.0.2 on Windows OK. It fixes the behavior of the selection when holding SHIFT, but breaks it when not holding SHIFT. To reproduce, use similar steps as above, but after step 3, try to highlight a new section of the document without holding down SHIFT and you'll see what I mean. It's treating the old cursor point as the start of your selection. |
I see. Unfortunately I don’t know Tcl, but there might be an improved version of modernText out there that handles it (this version is from 2007). I also found that autocomplete wasn’t working (pressing Ctrl+Space), but I don’t know if it ever did. |
If I hold down SHIFT and then left-click somewhere in my code, my expectation is that it should highlight all of the text between the current cursor position and where I've clicked.
Instead, it highlights the text between where I've just clicked, and the last place I clicked before that. i.e. It thinks the current cursor position is still located where I last dropped it using the mouse, when in fact I could have moved the cursor using the keyboard since that time.
To reproduce:
If you need more specific steps to reproduce, try this:
Repeat the above steps in any other text editor (e.g. Notepad, a Chrome TEXTAREA, etc) to see the more intuitive way it should function.
Note this was tested using Thonny 4.0.2 on Windows 7.
This is my first Thonny bug report, please be gentle and forgive me if I didn't fill out the correct template or whatever.
EDIT: I think this might also explain the cause of Issue #912
The text was updated successfully, but these errors were encountered: