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
My extension broke because a call to TextEditorEdit.replace does not select the inserted text anymore, when the selection was empty.
For example, for a text file
a <sel> b
calling editor.edit(e => e.replace(<sel>, "test")) used to give
a <start>test<end> b
now it gives
a test<sel> b
I'm not 100% sure if this intentional, but it makes working with replace much harder, because now I have to create the selections manually which is a super headache.
Note also that this is not in line with the behaviour when something is selected.
For example, the same call from above gives the expected, original behaviour when something is selected:
a <start>x<end> b
=>
a <start>test<end> b
VS Code version: Code 1.78.0 (252e546, 2023-05-03T20:09:46.685Z)
OS version: Linux x64 5.15.110
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.110
System Info
Item
Value
Remote
Dev Container: code-clip-ring-docker-dev
OS
Linux x64 5.15.110
CPUs
AMD Ryzen 9 5900X 12-Core Processor (24 x 3324)
Memory (System)
62.72GB (55.35GB free)
VM
0%
Extensions (13)
Extension
Author (truncated)
Version
Bookmarks
ale
13.3.1
spellright
ban
3.0.116
language-postcss
cpy
1.1.0
vscode-great-icons
emm
2.1.92
vscode-drawio
hed
1.6.6
remote-containers
ms-
0.292.0
remote-ssh
ms-
0.102.0
remote-ssh-edit
ms-
0.86.0
remote-explorer
ms-
0.4.0
scala
sca
0.5.6
pdf
tom
1.2.2
gitignore
cod
0.9.0
gitlens
eam
13.6.0
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered:
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.78.2. Please try upgrading to the latest version and checking whether this issue remains.
Type: Bug
My extension broke because a call to
TextEditorEdit.replace
does not select the inserted text anymore, when the selection was empty.For example, for a text file
calling
editor.edit(e => e.replace(<sel>, "test"))
used to givenow it gives
I'm not 100% sure if this intentional, but it makes working with replace much harder, because now I have to create the selections manually which is a super headache.
Note also that this is not in line with the behaviour when something is selected.
For example, the same call from above gives the expected, original behaviour when something is selected:
VS Code version: Code 1.78.0 (252e546, 2023-05-03T20:09:46.685Z)
OS version: Linux x64 5.15.110
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.110
System Info
Extensions (13)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: