ternjs / tern

A JavaScript code analyzer for deep, cross-editor language support
https://ternjs.net/
MIT License
4.25k stars 378 forks source link

Empty autocomplete when no empty line after the editing line after dot. #729

Closed carlitux closed 8 years ago

carlitux commented 8 years ago

Doesn't work this

var obj = {
    name: 'yuuko',
    getName: function () {
        return this.name;
    },
    showName: function () {
        console.log(this.name);
    }
};

obj.
console.log(test);
{  
   "query":{  
      "docs":true,
      "lineCharPositions":true,
      "end":{  
         "line":10,
         "ch":5
      },
      "file":"#0",
      "type":"completions",
      "types":true
   },
   "files":[  
      {  
         "type":"full",
         "name":"test.js",
         "text":"var obj = {\n\tname: yuuko,\n\tgetName: function () {\n\t\treturn this.name;\n\t},\n\tshowName: function () {\n\t\tconsole.log(this.name);\n\t}\n};\n\nobj.
console.log(test);\n"
      }
   ]
}

This works, see new line on obj.

var obj = {
    name: 'yuuko',
    getName: function () {
        return this.name;
    },
    showName: function () {
        console.log(this.name);
    }
};

obj.

console.log(test);

Related issue https://github.com/carlitux/deoplete-ternjs/issues/6

carlitux commented 8 years ago

Fixed on my side.