You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using textview.AsEditable.SetSelections it is adding a new caret selection on top of the current one the editor has.
Repro
The extension command is going to set the caret selection to 5, you can notice the fifth character appears as a blue caret, while the old caret position is still kept (and respected) as the red caret.
Bug.SetSelections.mp4
Code
await Extensibility.Editor().EditAsync(
batch =>
{
var caret5 = new TextPosition(textView.Document, 5);
textView.AsEditable(batch).SetSelections([new Selection(activePosition: caret5, anchorPosition: caret5, insertionPosition: caret5)]);
},
cancellationToken);
The text was updated successfully, but these errors were encountered:
When using textview.AsEditable.SetSelections it is adding a new caret selection on top of the current one the editor has.
Repro
The extension command is going to set the caret selection to 5, you can notice the fifth character appears as a blue caret, while the old caret position is still kept (and respected) as the red caret.
Bug.SetSelections.mp4
Code
The text was updated successfully, but these errors were encountered: