Closed
Description
Bug Report
🔎 Search Terms
- selectionRange
- Smart selection
- expand selection
🕗 Version & Regression Information
Reproduces in 4.3.0-dev.20210210
Not a regression
💻 Code
For the code:
const a = 123 // a b c
Put the cursor in the comment and run expand selection
🙁 Actual behavior
A single selection range for the entire line is returned:
[Trace - 09:12:08.176] <syntax> Sending request: selectionRange (53). Response expected: yes. Current queue length: 0
Arguments: {
"file": "/Users/matb/projects/san/a.js",
"locations": [
{
"line": 1,
"offset": 19
}
]
}
[Trace - 09:12:08.177] <syntax> Response received: selectionRange (53). Request took 1 ms. Success: true
Result: [
{
"textSpan": {
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 1,
"offset": 25
}
}
}
]
🙂 Expected behavior
There should be a selection range for the single line comment.
Preferably, I think there should actually be two here:
- One for the comment body:
a b c
- One for the entire comment:
// a b c