Inconsistent Highlighting of Identical Text in YAML Files
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.91.1 (Universal)
- OS Version: Darwin arm64 24.3.0
Environment: Version: 1.91.1 (Universal) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:54.982Z (8 mos ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 24.3.0
When selecting text in a YAML file, VS Code is expected to highlight all identical occurrences of the selected text in a slightly opaque format. However, in some cases, this behavior is inconsistent, and identical text does not get highlighted properly.
Steps to Reproduce:
1.Create a new file named xyz.yaml and add the following content:
modernABC:
uri: "[{\"type\":\"irct\",\"regx\":\".people.com\",\"uri\":\"https://river-iron-clad.river.people.com/.well-known/jwks.json\"},{\"type\":\"okta\",\"regx\":\"https://login.sec.people.com\",\"uri\":\"https://login.sec.people.com/oauth2\"}]"
global:
modernABC:
uri: "[{\"type\":\"irct\",\"regx\":\".people.com\",\"uri\":\"https://river-iron-clad.river.people.com/.well-known/jwks.json\"},{\"type\":\"okta\",\"regx\":\"https://login.sec.people.com\",\"uri\":\"https://login.sec.people.com/oauth2\"}]"
- Select the content of uri in either section (modernABC or global.modernABC).
- Observe that although both lines contain the exact same text (confirmed by searching for the string and finding two occurrences), selecting the entire uri value in one instance does not cause the other occurrence to be highlighted in an opaque format.
Expected Behavior: When selecting a piece of text, all identical occurrences in the document should be highlighted with the expected opacity.
Actual Behavior: The second identical occurrence is not highlighted properly when the first occurrence is selected.
Environment: Version: 1.91.1 (Universal) Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:07:54.982Z (8 mos ago) Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 24.3.0
Additional Context:
- The issue can be confirmed by manually searching for the text and verifying that both occurrences exist.(check attached video)
- Attached are screen recordings demonstrating the issue.
- Did try running code --disable-extensions and still facing this issue.
https://github.com/user-attachments/assets/8febf0b3-d5e2-4021-bfd6-aaf1f920b332
that's the builtin 200char (180?) limit unrelated to yaml
@RedCMD I agree. This issue may not be limited to YAML and could apply to all types of files.
/duplicate
@hediet Is there an original issue that covers this issue, can you point to such a GitHub issue?
- https://github.com/microsoft/vscode/issues/228140
- https://github.com/microsoft/vscode/issues/177400
- https://github.com/microsoft/vscode/issues/111002
- https://github.com/microsoft/vscode/issues/100765