vscode: Integrated terminal mouse reporting not working
- VSCode 1.44.2
- macOS 10.14.6
Steps to Reproduce:
- Open a file in vim by running
vim <file>in the integrated terminal - Type
:set mouse=aand press enter, to enable mouse reporting - Now, selecting text in the file you opened does not work
This apparently does not affect tmux.
Does this issue occur when all extensions are disabled?: Yes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 20 (10 by maintainers)
Commits related to this issue
- fix #96058 — committed to microsoft/vscode by meganrogge 3 years ago
- Fix terminal mouse reporting via binary events (#120145) * fix #96058 — committed to microsoft/vscode by meganrogge 3 years ago
@nojvek that would be awesome! Here’s roughly what’s involved in that:
Create
ITerminalInstance.onBinary, implement the event inTerminalInstanceand hook up to xterm:https://github.com/microsoft/vscode/blob/fa7d5e7def0e9c44041ce2b2f4505ebbbae0a5a0/src/vs/workbench/contrib/terminal/browser/terminal.ts#L291-L295
Copy where
onData(akaonProcessData) goes withonBinary(onProcessBinary), find references/text search should help here. It will need to cover:There is also
RemoteTerminalChannel, just fill in the interfaces and leave a TODO there and I can fill that part in.Well it seems apps and libs like ncurses have a hard time to figure out what terminal xterm.js is, it seems they go for “safe denominator” which switches off SGR mouse reports for us currently (thats what happens in vim above). This is also the reason why I wrote the DA issue after inspecting the vim source.
About a valid terminfo entry - that would help ncurses and similar libs alot to get along with xterm.js. The current entry looks abit like a stub: https://invisible-island.net/ncurses/terminfo.src.html#toc-_Visual__Studio. Also it points to some issues we had in the past, some of them are already fixed.