You are not logged in.

#1 2023-01-28 06:46:34

idlepork
Member
From: Georgia
Registered: 2019-10-02
Posts: 10
Website

[SOLVED] Vim+st underlines command text after running a shell command

This is a fairly strange issue that appears during an update from vim and vim-runtime and disappeared when I applied the following downgrade:

[2023-01-28T01:25:31-0500] [ALPM] downgraded vim-runtime (9.0.1182-1 -> 9.0.0321-1)
[2023-01-28T01:25:31-0500] [ALPM] downgraded vim (9.0.1182-1 -> 9.0.0321-1)

`

I'm using st (https://suckless.org/st) on the newest version (commit e5e959835b195c023d1f685ef4dbbcfc3b5120b2) on i3-gaps (which I suspect isn't the culprit here). I've just updated my system on Sat 28 Jan 2023 06:35:43 AM UTC, and the issue is still appearing.

I open a new st window, and then I run

vim

and then in vim, I run

!ls<Return>

and after returning from the command output, I type

:help

which is underlined inside the command window.
This isn't intended behavior as far as I'm aware, and I haven't had much success with looking up "vim underline command prompt" on the internet.

This would be an annoyance, but I believe that this is closely related to an issue that I've had with complete rendering failures (related to underlines) when a plugin runs an external command on startup.
The underline goes away after some types of interaction, but I would really like to get this to stop.

I'm not sure where to start on debugging, and I'll reply at my next chance, but I'll be offline for a few hours. If there is any extra debug information wanted, I'd be happy to provide it.

Edit: this also happens when I run with an empty .vimrc.

Last edited by idlepork (2023-01-28 14:53:37)

Offline

#2 2023-01-28 08:00:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,392

Re: [SOLVED] Vim+st underlines command text after running a shell command

ls entering "!ls" first crucial or is the command underlined all the way?
I'd suspect something escape code from your shell/prompt leaks into vim?

There were recently escape sequence handling related changes, mostly revolving around bracketed pasting, though.

Online

#3 2023-01-28 14:53:07

idlepork
Member
From: Georgia
Registered: 2019-10-02
Posts: 10
Website

Re: [SOLVED] Vim+st underlines command text after running a shell command

Yes, entering

!ls

(or some other command) is necessary in order to get the effect.

After a git-bisect (I should have tried that earlier!) of the vim source, I found this thread on the vim developers group: https://groups.google.com/g/vim_dev/c/WAeaUtgVd74.
I also had TERM=xterm-256color so that I could interface easily with software (namely, a weirdly behaving ssh server).
It appears to be related to the control sequence XTQMODKEYS, which according to the thread was a similar bug in mintty, and the code ESC[4m apparently means underlines, and I'm guessing my terminal emulator is interpreting some capability request as underlines.

I'm going to mark this thread as [SOLVED] because I got rid of the issue by allowing TERM=st-256color.
I think I'm going to open an issue with st to see if they're interested in fixing this.

Thanks for the advice!

Offline

Board footer

Powered by FluxBB