Bug 456733 - Multiple Cursor Behavior: Alt+DoubleClick, Alt+Click+Drag and SelectText + Alt+Click
Summary: Multiple Cursor Behavior: Alt+DoubleClick, Alt+Click+Drag and SelectText + Al...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.04.2
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-15 00:53 UTC by Chris Holland
Modified: 2022-08-22 06:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.98


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Holland 2022-07-15 00:53:18 UTC
Via: https://old.reddit.com/r/kde/comments/vyuynb/which_ide_or_editor_do_kde_programmers_use_to/ig6cdh6/?context=3

In sublime text, you can Ctrl+DoubleClick to create a new cursor select the word underneath the mouse.
You can also Ctrl+Click+Drag to create a cursor and select characters.

This is more a niche wishlist feature, except it's possible for the user to slightly drag when clicking. Currently when Alt+Click+Dragging, Kate will delete all but the first cursor and create a selection from it to the mouse. It should be editing the selection of the last cursor only when Alt is pressed while keeping the other cursors.

Another bug related to multi-cursor selections is that all selections are reset when you Alt+Click to create a new cursor. To test, select a word, then Alt+Click.
Comment 1 Waqar Ahmed 2022-07-15 06:19:04 UTC
Multiple selections with mouse are not supported yet. Nor is a mixture of selections and simple cursors supported.
Comment 2 Grósz Dániel 2022-08-22 00:10:23 UTC
I just found this issue as I accidentally lost my cursors after moving the mouse a bit while Alt+Clicking.

As for what Kate should actually do when Alt+Dragging, there are multiple reasonable options: one is to create a new cursor and just one selection. When the new selection created by the mouse would include an existing cursor, there is another option: create equivalent selections around all existing cursors, move all cursors (except when the mouse is released right at an existing cursor), and don't create a new cursor.

Likewise, Alt+DoubleClick could either select just one word or, if the word under the mouse includes an existing cursor, another option is to select the word under each existing cursor.
Comment 3 Waqar Ahmed 2022-08-22 06:00:01 UTC
This is now implemented.

https://github.com/KDE/ktexteditor/commit/8942e2da8fdba77e44fff42c21ddd2a147e18644