3

Long story, short.... Everything's fine on my MacBook, but I have an issue in Neovim 0.9.1 on Windows 10. I see this behavior when

  1. starting nvim from the usual shells - Command Prompt (cmd.exe), Powershell, and Git Bash;
  2. in their default console programs and Windows Terminal; and
  3. with all three values of :set shell - cmd.exe, pwsh, and bash.

I thought it was a bug in one of the plugins I use, but by process of elimination, I now think the issue is in vanilla Neovim.

The problem is: when closing a :terminal window, there is a delay of 4 seconds before it responds. I can shorten the delay by pressing a key within that 4 seconds. The delay seems to be related to the 'updatetime' setting, whose default is 4000ms. Setting it to 1000, reduces the wait time to 1 second, which seems to substantiate my claim. However, I don't see how closing a terminal window should be related to that setting, so I'm reluctant to change it.

The steps to reproduce the issue are below. Has anyone else seen this and know what's happening? Should I report this to the neovim github repo? I wanted to ask this here before I added to their already large backlog of issues.

$ nvim -u NONE
:set updatetime?    " prints 4000
:terminal
exit                # 4-second delay before terminal window closes
:set updatetime=1000
:terminal
exit                # 1-second delay before terminal window closes

Update

Git ships with its own copy of vim, version 9.0 in my case, which you can run inside of the Git Bash window. I don't see this issue there. So this is looking like a Neovim-only issue.

6
  • 1
    I think How to debug my vimrc contains some other invocations besides -u NONE that might help reduce the problem (ex: a mapping on Escape or Ctrl-D might cause some weirdness? plugins?)
    – D. Ben Knoble
    Aug 7, 2023 at 15:02
  • Thanks for the reference; there was a lot of new information there. Unfortunately, none of those suggestions helped narrow anything down. -u NONE seems to be the correct option to use for 'out-of-the-box' Neovim. :scriptnames shows nothing, there are only two autocommands: nvim_cmdwin CmdWinEnter and nvim_terminal BufReadCmd, and :map shows only x #, x *, n &, n Y, and n <C-L>. Still seeing the same issue.
    – Phil R
    Aug 9, 2023 at 2:16
  • Time for a bug report, maybe?
    – D. Ben Knoble
    Aug 9, 2023 at 15:22
  • Perhaps. I'll need to do some more investigation, and organize my results first. Thanks for your help.
    – Phil R
    Aug 10, 2023 at 13:39
  • I submitted the following bug report after reproducing this: github.com/neovim/neovim/issues/27615 Feb 24 at 22:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.