Skip to content

Holding ctrl when hovering paths in text_button.dart returns a range far larger than expected #3867

Closed

Description

@DanTup

Holding ctrl while hovering the path on line 57 highlights a region far larger than expected:

Screenshot 2022-03-09 at 13 57 36

Activity

  1. DanTup commented on Mar 9, 2022

    @DanTup
    MemberAuthor

    Seems to be coming from the server like this:

    "originSelectionRange": {
    	"start": {
    		"line": 56,
    		"character": 19
    	},
    	"end": {
    		"line": 124,
    		"character": 26
    	}
    },
    

    Full request/response:

    ==> {
    	"jsonrpc": "2.0",
    	"id": 96,
    	"method": "textDocument/definition",
    	"params": {
    		"textDocument": {
    			"uri": "file:///Users/danny/Dev/Google/flutter/packages/flutter/lib/src/material/text_button.dart"
    		},
    		"position": {
    			"line": 56,
    			"character": 37
    		}
    	}
    }
    <== {
    	"id": 96,
    	"jsonrpc": "2.0",
    	"result": [
    		{
    			"originSelectionRange": {
    				"start": {
    					"line": 56,
    					"character": 19
    				},
    				"end": {
    					"line": 124,
    					"character": 26
    				}
    			},
    			"targetUri": "file:///Users/danny/Dev/Google/flutter/examples/api/lib/material/text_button/text_button.0.dart",
    			"targetRange": {
    				"start": {
    					"line": 0,
    					"character": 0
    				},
    				"end": {
    					"line": 0,
    					"character": 0
    				}
    			},
    			"targetSelectionRange": {
    				"start": {
    					"line": 0,
    					"character": 0
    				},
    				"end": {
    					"line": 0,
    					"character": 0
    				}
    			}
    		}
    	]
    }
    
  2. added this to the v3.38.0 milestone on Mar 9, 2022
  3. DanTup commented on Mar 9, 2022

    @DanTup
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions