Autocomplete popup should not be displayed after `var `, `let ` or `const `

RESOLVED FIXED in Firefox 64

Status

defect
P1
normal
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Tracking

unspecified
Firefox 64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

(Whiteboard: [boogaloo-mvp])

Attachments

(1 attachment)

**Steps to reproduce**
1. Open the console
2. Type `var w`

**Actual results**

The autocomplete popup opens, but since I want to define a new variable it gets into my way.

---

We should simply not show the autocomplete when the user wants to define a variable.
I guess this could be extended to `function `, `class ` and I'm sure other I'm forgetting when it does not make sense to show the popup.
Whiteboard: [boogaloo-mvp]
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
This patches solves 2 issues:
- it doesn't return any result when the user is trying to
perform a variable, function or class declaration (e.g.
var d).
- js-property-provider used to compute the last statement
by only looking for space or ; chars. But there are a lot
of cases (basically each time using an operator), where we
should return results and we weren't.
Test cases are added to cover those fixes.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a8e1eaf6d370
Make js-property-provider better; r=bgrins.
https://hg.mozilla.org/mozilla-central/rev/a8e1eaf6d370
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.