ConEmu: BufferHeight causes a delay when opening/closing apps that use alternate screen (eg vim, nano, etc)

Versions

ConEmu build: 171226 x32/x64 (tried with both) OS version: Windows 10 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): bash (WSL)

Problem description

Whenever I open or close a file using vim there’s a delay of several seconds. Other apps that use the alternate screen mechanism (such as nano) seem to have the same problem as well. Turning off the BufferHeight option by pressing the related button on the tab bar fixes the issue, but then I lose all scrollback.

Steps to reproduce

  1. Install WSL, Ubuntu (from the MS store), and ConEmu.
  2. Open any file using the vim or nano commands that ship with the Ubuntu instance from the MS store.

Some notes/observations

  • When I close a file in vim, there’s first a slight delay, then the terminal screen loses all color and goes black and white, and then there’s a longer delay before vim finally quits. Not sure if that’s a helpful detail for tracking down the issue, but it is pretty weird.

  • The Real console (from the debug menu) has slightly different behavior from the actual ConEmu console. When opening a file with vim, both the Real and the ConEmu consoles hang for a couple of seconds. However, when I close vim it closes instantly in the Real console, whereas the ConEmu console hangs again for a couple of seconds.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 15
  • Comments: 33 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Work on new pty interface is in progress

Disabling (unchecking) bufferheight doesn’t work for me, but changing the value to something smaller does…

I’ve found that using smaller values (say 3000) seems to be a decent compromise until there’s a fix.

@bytefluxio Hey, I got the same problem. Both vim.exe(8.2.2859) in Windows(21H1 19043.1055) and vim(8.1.2269) in WSL2(Ubuntu 20.04.2) there is a ~2sec delay opening and closing, but using Windows Terminal(1.8.1521.0) or PowerShell(7.1.3) will not. I found uncheck “Inject ConEmuHk.dll into all processes started in ConEmu tabs” in Settings can solve this problem. (ConEmu 210422)

image

I am still experiencing the same issue today. Version 191012 preview After decreasing Buffer Height to 3000, open vim is much faster. But closing vim still takes long time. I am wondering if there had been regression recently.

gh-1841

Oh, sorry, it was closed just few hours ago and I missed that. Just upgraded and looks like it isn’t slow anymore. Thanks.