| Summary: | Web Inspector: Improve Autocomplete in the Console | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | ASSIGNED --- | ||||||
| Severity: | Normal | CC: | graouts, hi, inspector-bugzilla-changes, jonowells, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
http://trac.webkit.org/browser/trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js#L579 CodeMirror provides lexical types which I was hoping to leverage. Unfortunately, for both cases below the lexical type is the same "vardef": var a| <- shouldn’t autocomplete var a = myFunc| <- should autocomplete Lexical type ")": function a(b| <- shouldn’t autocomplete if(myFunc| <- should autocomplete Lexical type "stat": {a| <- shouldn’t autocomplete myFunc| <- shouldn’t autocomplete Seems like the only case I can fix is:
function a|
At this case CodeMirror’s lexical type is "block".
However,
var fn = function a|
is lexical type "vardef" and
function fn() {return function a|
is lexical type "stat". These two will still trigger pointless autocomplete.
|
Created attachment 248969 [details] Animated GIF of the current behavior Don’t autocomplete: var a| function a| function myFunc(a| class a| {a| {get a| (Text cursor is marked by |) The current behavior is demonstrated in the attached animated GIF.