You are not logged in.

#1 2020-10-10 19:55:25

LIParadise
Member
Registered: 2020-08-03
Posts: 9

[SOLVED] (n)vim freeze till another keypress in some terminal emulator

I don't quite know where to post the question (gnome-terminal gitlab issues, docs.xfce.org, or vim/neovim), so notify me when I'm at the wrong place.


The problem is the following:
When using gnome-terminal or xfce4-terminal to use vim or neovim, either insert mode or normal mode, sometimes keystrokes don't show corresponding move in the buffer untill I press another key. The keys aren't ignored, it's just that their effect don't show on screen till another keystroke.
For example, in normal mode, sometimes vim/neovim would act like nothing had happened after I press single `j` key, only starts to move the cursor and enter insert mode when I press another `i` key.
This is surprisingly annoying since the movements are now inexact, and I often find myself edited at the wrong place, e.g. `ciw` would replace the wrong word.


I don't think this being an issue related to my plugins, since both neovim/vim act properly in either tty or urxvt.
Unfortunately, I can't figure out where `gnome-terminal` and `xfce4-terminal` put their log, so please tell me where to find them if you need more information.


$ gnome-terminal --version
# GNOME Terminal 3.38.1 using VTE 0.62.1 +BIDI +GNUTLS +ICU  +SYSTEMD
$ xfce4-terminal --version
xfce4-terminal 0.8.9.2 (Xfce 4.14)

Copyright (c) 2003-2020
	The Xfce development team. All rights reserved.

Written by Benedikt Meurer <benny@xfce.org>,
Nick Schermer <nick@xfce.org>
and Igor Zakharov <f2404@yandex.ru>.

Please report bugs to <https://bugzilla.xfce.org/>.
$ neofetch wm de
wm: Mutter 
de: GNOME 3.38.1
$ vim --version | head -n 3
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 17 2020 21:54:53)
Included patches: 1-1704
Compiled by Arch Linux
$ nvim --version | head -n 3
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5

Last edited by LIParadise (2020-10-12 13:39:37)

Offline

#2 2020-10-11 07:29:44

seth
Member
Registered: 2012-09-03
Posts: 49,991

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

Wayland or X11?
If wayland, does it also happen on X11?
Does it happen w/ the VTE3 terminals (gnome/xfce) on eg. openbox?
Does it happen with the shell (ie. running bash in the terminal, not vim)?

Online

#3 2020-10-11 08:43:55

LIParadise
Member
Registered: 2020-08-03
Posts: 9

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

*edit*:
Sorry I got confused with my original setup.
I thought when I don't see the "gnome on Xorg" option in the gnome login screen I'm on wayland, but both $XDG_SESSION_TYPE and `loginctl` say I'm `x11`. So I'm on `x11`, not `wayland`.

seth wrote:

Wayland or X11?
If wayland, does it also happen on X11?

Sorry I didn't mention this.
I'm currently gnome on x11, running proprietary nvidia driver.

seth wrote:

Does it happen w/ the VTE3 terminals (gnome/xfce) on eg. openbox?

I'm not so familiar with other WM/DE, however I did have had some experience with `sway`, so I tried

sway --my-next-gpu-wont-be-nvidia

Short answer: No, gnome-terminal and xfce4-terminal are both okay with sway, though I'm with nvidia which sway don't officially support.

seth wrote:

Does it happen with the shell (ie. running bash in the terminal, not vim)?

No, in either gnome-terminal or xfce4-terminal I can type commands normally under gnome on x11, and other editors for example `nano` works fine.


Some additional info:

I find `alacritty` and `konsole` don't have such issues under gnome on x11 either, besides `urxvt` mentioned earlier.

Last edited by LIParadise (2020-10-11 09:18:14)

Offline

#4 2020-10-11 12:49:53

seth
Member
Registered: 2012-09-03
Posts: 49,991

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

Seems we had this before, https://bbs.archlinux.org/viewtopic.php?id=235547 (don't reply to that thread)
The issue would be between Mutter, VTE3 and n/vim… what's rather specific.

Does it happen w/ "nvim -u NORC"?
https://github.com/neovim/neovim/issues/9452

Online

#5 2020-10-12 01:42:01

LIParadise
Member
Registered: 2020-08-03
Posts: 9

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

seth wrote:

Does it happen w/ "nvim -u NORC"?
https://github.com/neovim/neovim/issues/9452

Thanks for the link, the problem is indeed similar, and I think Scriptor had described this problem quite better than I did.

Anyway, unfortunately, the problem persists with "nvim -u NORC", both in gnome-terminal and xfce4-terminal, x11 nvidia.

Upon more observations, I noted that the problem DID affect the shell itself and other CLI editors like nano, as mentioned by Scriptor in the link -- sorry I didn't notice this earlier.

However when in nano, as described by Scriptor, it did seem more smooth than (n)vim.

As for the shell in the two terminal, I observed another symptom, though: when exiting programs -- not only (n)vim or nano, even simple python3 hello world scripts -- the new command prompt may not appear immediately; it's kinda freezed, as in the editors, and upon next keyboard input it shows the prompt and the typed words like nothing happened.

Offline

#6 2020-10-12 06:30:20

seth
Member
Registered: 2012-09-03
Posts: 49,991

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

So VTE3 ./. Mutter (on X11) for now.
To see whether it's VTE3, VTE3  ./. any X11 compositor or a Mutter issue, you'd have to eg. try the behavior w/ openbox (uncomposited) and openbox+picom.

Online

#7 2020-10-12 13:38:11

LIParadise
Member
Registered: 2020-08-03
Posts: 9

Re: [SOLVED] (n)vim freeze till another keypress in some terminal emulator

Thanks for the help, your keywords gave me lots of hints, if not these hints I would probably use much more time to pinpoint the problems.
Unfortunately, I'm afraid I won't have time to test other setups till November, possibly even later; plus now that I knew `alacritty`, `konsole`, `rxvt` etc that don't depend on vte3, so my question now have a workaround.

Marking the thread as solved.

Offline

Board footer

Powered by FluxBB