()
| 309 | return os.path.join(tern_projectDir(), path) |
| 310 | |
| 311 | def tern_refs(): |
| 312 | data = tern_runCommand("refs", fragments=False) |
| 313 | if data is None: return |
| 314 | |
| 315 | refs = [] |
| 316 | for ref in data["refs"]: |
| 317 | lnum = ref["start"]["line"] + 1 |
| 318 | col = ref["start"]["ch"] + 1 |
| 319 | filename = tern_projectFilePath(ref["file"]) |
| 320 | name = data["name"] |
| 321 | text = vim.eval("getbufline('" + filename + "'," + str(lnum) + ")") |
| 322 | refs.append({"lnum": lnum, |
| 323 | "col": col, |
| 324 | "filename": filename, |
| 325 | "text": name + " (file not loaded)" if len(text)==0 else text[0]}) |
| 326 | vim.command("call setloclist(0," + json.dumps(refs) + ") | lopen") |
| 327 | |
| 328 | # Copied here because Python 2.6 and lower don't have it built in, and |
| 329 | # python 3.0 and higher don't support old-style cmp= args to the sort |
nothing calls this directly
no test coverage detected