-
The setPosition function moves the position of the cursor but does not highlight Occurences Playground example: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@alexdima is this a bug or a feature? @siddhant1 can you try to debug this? |
Beta Was this translation helpful? Give feedback.
-
This is intentional. The occurrence highlighter only runs for explicit cursor gestures -- https://github.com/microsoft/vscode/blob/d912e6c92514b3dd524fe6ff1332a06c5f1d5534/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.ts#L332-L336 @siddhant1 You can try pretending to be the mouse and use |
Beta Was this translation helpful? Give feedback.
This is intentional. The occurrence highlighter only runs for explicit cursor gestures -- https://github.com/microsoft/vscode/blob/d912e6c92514b3dd524fe6ff1332a06c5f1d5534/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.ts#L332-L336
@siddhant1 You can try pretending to be the mouse and use
editor.trigger('mouse', '_moveTo', { position: { column: 13, lineNumber: 1 } })
. See playground example.