Double-click or ctrl click to navigate to error lines in editor
ZoeyR opened this issue · comments
From @garethj-msft on July 26, 2017 21:47
If I run a build or other build-shaped tool that spits output in standard
"file(line,column): error message" format, I should navigate to that position in the editor if the file is available.
Copied from original issue: ZoeyR/WhackWhackTerminal#9
From @Tyriar on August 3, 2017 5:41
xterm.js does have support for this, however it is not documented and experimental meaning the API could change at any time.
@Tyriar I would be interested in using that API. As I understand it VSCode uses the API as well. Would you be able to point me towards where in the code this API is used?
From @Tyriar on August 3, 2017 17:28
@dgriffen just remember it might change in the future. VS Code uses it because I maintain both 😛
https://github.com/sourcelair/xterm.js/blob/0079677e43999d26ed750a7cc36306e6acb7f62a/src/xterm.js#L1392
https://github.com/sourcelair/xterm.js/blob/0079677e43999d26ed750a7cc36306e6acb7f62a/src/xterm.js#L1404
@Tyriar its fine if it changes, I'm willing to update for that. I figure since VSCode uses it I should be relatively safe that none of the xtermjs changes would permanently break my extension. Especially since I have control over which version of xtermjs I ship with my extension.
An initial implementation of this landed in #21. The implementation doen't have an activator key for the links, a simple click will take you to the error. If more features are desired a new issue can be opened.