eclipse-platform / eclipse.platform.ui

Eclipse Platform
https://projects.eclipse.org/projects/eclipse.platform
Eclipse Public License 2.0
78 stars 163 forks source link

Cursor multi-select pastes multiple copies multiple times instead of one copy multiple times #1813

Open zhro opened 5 months ago

zhro commented 5 months ago

This is very bizarre behavior for a multi-cursor feature. When I paste across multiple cursors, I expect one paste copied multiple times. Instead, I get multiple copies multiplied by the number of cursors I have.

See here for a demonstration:

https://youtu.be/rCqceurvXI8

I am adding a selection of text to the clipboard with Ctrl-X. Then I made multiple selections to where I want to paste it with Ctrl-V. Instead of one copy pasted at each selection/cursor, the number of copies multiplies times the number of cursors. This is very bizarre and unexpected.

lukeu commented 2 months ago

Incidentally I do see this issue if I either:

  1. Use ALT-click to place multiple cursors, or
  2. Use the new Ctrl+F Find overlay (new in 4.33) to select multiple matches

I do not see the issue if I make a rectangular selection. But the only way I know how to do this is to go into Block Selection mode (Alt+Shift+A). I'm curious how you reproduced this video? Did you assign a custom keyboard shortcut to create multiple cursors?

mickaelistria commented 2 months ago

Use the new Ctrl+F Find overlay (new in 4.33) to select multiple matches

FWIW, you don't particularly need the new find dialog, the older one has had "Select All" that can do it too.

Use the new Ctrl+F Find overlay (new in 4.33) to select multiple matches

There are some shortcuts already assigned. In Preferences > General > Keys, search for "caret" and you'll see them.

lukeu commented 2 months ago

the older one has had "Select All" that can do it too.

Ah yes, so it can. Yes, now you mention I remember that coming in and making the dialog bigger - but guess I never used it. Strange how a visual change can change the way you expect to do something...

There are some shortcuts already assigned. In Preferences > General > Keys, search for "caret" and you'll see them.

Thanks found them, although in Eclipse SDK (at least) these appear to be unbound.

angelickite commented 2 months ago

I encounter this issue using the keybinds for

Version: 2024-06 (4.32.0)
Build id: 20240606-1231