Skip to content
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

Feature Request: Multi-Line Editing #138

Open
WesleyM77 opened this issue Feb 19, 2020 · 2 comments
Open

Feature Request: Multi-Line Editing #138

WesleyM77 opened this issue Feb 19, 2020 · 2 comments

Comments

@WesleyM77
Copy link

Feature Request

Allow editing text on multiple lines at once.

Example

2020-02-19_08-38-03

My example is rather rudimentary, but there have been plenty of instances in more complex cases where I've wanted to have multi-line editing. For example in PHPStorm, a middle click and drag will put multiple cursors, as well as alt-clicking.

@CWBudde
Copy link
Contributor

CWBudde commented Apr 10, 2020

I'd like to have that as well, but I doubt it will be simple to implement. At the moment the code is just aware of one single caret. I'm not even sure if multiple carets are allowed by the underlying windows API or whether the drawing must be performed by custom code.

I mean the WinAPI does have a 'CreateCaret' call, which results in a caret handle. However, it's only possible to set the position for one Caret with 'SetCaretPos(X, Y: Integer): BOOL;' without being able to reference to any other than the one caret.

A comment mentioned: "CreateCaret automatically destroys the previous one, so we don't have to worry about cleaning up the old one here with DestroyCaret." which indicates for the fact that the caret must be painted by custom code, which will surely make it more complicated to ensure the stability of this code.

@WesleyM77
Copy link
Author

Looking a little closer at the WinAPI, only one caret is allowed per queue. So, unless you folks want to switch away from the WinAPI, it's probably safe to close this ticket unfortunately. I'll leave it open in case there's a chance it could happen, but I was just looking through my issues and looked a bit further into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants