Skip to content

input: Multi cursors - #2837

Merged
huacnlee merged 16 commits into
longbridge:mainfrom
zanmato:multi-cursors
Sep 6, 2026
Merged

input: Multi cursors#2837
huacnlee merged 16 commits into
longbridge:mainfrom
zanmato:multi-cursors

Conversation

@zanmato

@zanmato zanmato commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Closes #879

Description

This adds multi cursors to the input, alt-click and shift-alt drag to add multiple. I've been running this for a while in my fork, with another undo manager. I've now pulled it out and rebased it onto the new undo manager.

I know this is too much to review, but it would be nice to get it upstream. I am putting this here as a draft if you want to use it as a basis for your own implementation, also the tests are pretty good to keep if you do decide to add it.

Video

Screencast.From.2026-08-26.10-55-53.mp4

How to Test

Ran the editor example

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

@huacnlee

Copy link
Copy Markdown
Member

In video, highlgihts broken after text changed.

@zanmato

zanmato commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

In video, highlgihts broken after text changed.

Hmm, I don't see it. Where do you mean? It looks the same after undoing the invalid syntax

@huacnlee

Copy link
Copy Markdown
Member

Oh, never mind that. I was wrong. It's correct.

@huacnlee

huacnlee commented Sep 6, 2026

Copy link
Copy Markdown
Member

Hi @zanmato please keep going when you have time, I'd like merge this feature.

@zanmato

zanmato commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @zanmato please keep going when you have time, I'd like merge this feature.

I've rebased it with the new affinity changes. Note that there is a performance issue with undoing a lot of cursors, because of parse_injection_layers. This issue is in main as well, but gets amplified with a lot of cursors. I didn't fix it here because there's already a lot of changes 😃

@zanmato
zanmato marked this pull request as ready for review September 6, 2026 09:58
@huacnlee
huacnlee merged commit cbdf5ba into longbridge:main Sep 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

input: Multi cursor and option + click to vertical select

2 participants