Skip to content

Miss on highlight #5369

@FMorschel

Description

@FMorschel

Describe the bug
If you ask for a highlight it shows every occurrence of that word.

To Reproduce

  1. Clone https://github.com/FMorschel/sdk/
  2. Go to 26241c9e8676b9bff7cef168de49a08b939ea800
  3. Open pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
  4. Leave the cursor at the first element (the new var) on line 481.

Expected behavior
For the highlight to be contained to a single variable (or to not show).
element on 506 and 507 as well as at the end of 481 should not be highlighted.

Screenshots
image

Please complete the following information:

Workspace Environment
Dart Code extension: 3.103.20241211
Flutter extension: 3.103.20241202 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.96.0

Workspace type: Dart (LSP) (Multiroot)
Workspace name: server2 (Workspace)

Dart (3.7.0-edge.d76f568f0e2280a59b3378bec95a00fee3f4ecbf): C:\Users\felip_0vh5fa6\dart
Flutter (3.27.0): C:\Users\felip_0vh5fa6\.puro\envs\stable\flutter (No device)

Output from 'dart info'

C:\Users\felip_0vh5fa6\dart\bin\dart.exe info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.7.0-edge.d76f568f0e2280a59b3378bec95a00fee3f4ecbf (main) (Fri Dec 13 06:29:44 2024 -0800) on "windows_x64"
  • on windows / "Windows 11 Pro" 10.0 (Build 22631)
  • locale is pt-BR

Project info

  • sdk constraint: '>=3.7.0-edge <4.0.0'
  • dependencies: _fe_analyzer_shared, analysis_server_plugin, analyzer, analyzer_plugin, args, collection, convert, crypto, dart_style, dtd, http, json_rpc_2, language_server_protocol, linter, matcher, memory_usage, meta, path, pub_semver, stream_channel, telemetry, unified_analytics, vm_service, watcher, yaml, yaml_edit
  • dev_dependencies: analyzer_utilities, cli_util, lints, logging, test, test_descriptor, test_reflective_loader, web_socket_channel

Process info

Memory CPU Elapsed time Command line
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions