-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim problems when TERM=xterm, but okay with TERM=linux #40
Comments
Huh I guess xterm supports some tokens basic ASCII terminals dont have to and vim tries to use it and breaks it? Probably best to print what kind of control sequences it uses in each case |
There also might be some issues with the way pseudoterminal is being set up. In the libtsm repo demo, I see some flags being set here https://github.com/Aetf/libtsm/blob/8d299ab6ba326d744d4359b37252878ab4c44ba9/src/shared/shl-pty.c#L104-L132. |
Firstly, opening vim with .vimrc disabled ( Connecting godot-xterm via socat in verbose mode shows the following characters being sent when opening and quitting vim:
Of interest is the "ESC [>4;m" sequence. On other terminals it doesn't seem to do anything, but on godot-xterm it is being mistaken for the underline command: Searching "vim >4;m" shows quite a few posts about this problem which started popping up after version 8.1.2134 of vim was released in Oct 2019 (~6 years after the last stable release of libtsm). This answer has quite a good explanation: https://vi.stackexchange.com/a/27400. Documentation for the escape sequence in question, which is xterm specific:
Source: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html In conclusion, the fork of libtsm used by godot-xterm should be patched to handle or ignore this sequence, or godot-xterm should not lie about being xterm in the TERM env var. However, for the second option I'm not sure what TERM type godot-xterm should masquerade as instead. Another option would be creating a custom termcap/terminfo entry, but I think it would be quite a lot of work verifying all the capabilities and users would also need to install this entry in their database (e.g. /usr/lib/terminfo/...) making godot-xterm quite a bit less portable. |
The sequences are: CSI > Pp ; Pv m (e.g. '\e[>4;m' CSI ? Pm $ p (e.g. '\e[?12$p' These sequences were being output by vim and causing the underline attribute to be set and the terminal to be reset. Fixes #40
|
The sequences are: CSI > Pp ; Pv m (e.g. '\e[>4;m' CSI ? Pm $ p (e.g. '\e[?12$p' These sequences were being output by vim and causing the underline attribute to be set and the terminal to be reset. Fixes #40
The text was updated successfully, but these errors were encountered: