-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support multiple selections (multi-cursor) when inserting converted time #49
Comments
Hi @healarconr, thx for raising this issue. I think we should definitly aim for multi cursor support. I would happily accept a PR for this issue. If somebody wants to take over this issue I would offer my support and guidance to get started. |
I saw that this method returns the text of the first selection: vscode-timing/src/commands/commandBase.ts Lines 128 to 139 in b3f6bb7
Maybe it can filter empty selections and return This other method uses it but also reads from the clipboard in case there is no selected text: vscode-timing/src/commands/commandBase.ts Lines 58 to 66 in b3f6bb7
Maybe a class that represents the text and an optional selection is needed there. Then the commands seem to pass the input text through some steps. Maybe these commands can iterate over the inputs obtained from Finally, the conversion result is inserted: vscode-timing/src/commands/commandBase.ts Lines 68 to 75 in b3f6bb7
It could use the optional |
I think the "conversion steps" must not be altered. I think there are quite some (edge) cases we must consider. For example what should happen if multiple rows are selected, but result insertion is turned off. Is the first conversion result shown? What if the multi selection consists of different timestamp formats. For example not only epoch timestamps. Should this lead to an error? I think this is a quite challenging issue with lots of different cases to be considered. |
Is your feature request related to a problem? Please describe.
I'm always frustrated when I want to insert multiple converted times because I have to run a conversion command for every time that I want to convert. When I run a conversion command having multiple selections the converted time is inserted only for the first selection.
Describe the solution you'd like
I would like that the conversion commands would insert all the converted times when the editor has multiple selections instead of just the first one. It would be similar to the way commands like "Transform to Uppercase" or "Transform to Lowercase" work.
Additional context
The text was updated successfully, but these errors were encountered: