How can I start multiple selections (cursors) in a text editor? #39
-
I want to select several text ranges and start multi-cursor editing throught the API. I looked into the docs and |
Beta Was this translation helpful? Give feedback.
Answered by
usernamehw
Jun 13, 2022
Replies: 1 comment 1 reply
-
You set multiple cursors by assigning textEditor.selections = [
new Selection(0, 1, 0, 1),
new Selection(0, 2, 0, 2),
]; TypeScript types show: selections: readonly Selection[]; It would have been readonly selections: readonly Selection[]; |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lgrammel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You set multiple cursors by assigning
selections
TypeScript types show:
It would have been
readonly
property if it was a prefix: