contour icon indicating copy to clipboard operation
contour copied to clipboard

`CreateNewTab` either keeps creating intermittent shells or badly handles exit

Open whisperity opened this issue 8 months ago • 1 comments

Contour Terminal version

0.6.1.7494

Installer source

GitHub: release page

Operating System

MacOS San Sequoia 15.3.1

Architecture

ARM64

Other Software

zsh 5.9 (arm64-apple-darwin24.0)

Steps to reproduce

  1. Open contour and echo $$.
  2. Something like 16957 appears.
  3. Press the CreateNewTab keybind.
  4. echo $$: 18158
  5. exit from this shell/tab.
  6. Another new empty tab is created??? Verify with echo $$.
  7. 18155
  8. exit again, observe a split second hang, then... another new empty tab is created???
  9. echo $$: 18153
  10. exit; echo $$: 18152
  11. exit again... it looks like now we are back to the originally started shell.
  12. echo $$: 16957

So this was 4 exits to get back. However, depending on how quickly the CreateNewTab keybind is pressed, it might be 6 or 8 exits.

Expected Behavior

One CreateNewTab creates exactly 1 new shell, not an arbitrary number of such.

Actual Behavior

Additional notes

This seems to me to be a lack of debouncing issue. Depending on how long the button press happens which might be influenced by system factors and latency, contour seems to create multiple zsh subprocesses.

whisperity avatar Mar 02 '25 13:03 whisperity

keybind behavior was changed at some point in the past, to become not repeatable, so if you press CreateNewTab it will be executed exactly once, this resolves the issue in my understanding, correct?

Yaraslaut avatar Mar 17 '25 17:03 Yaraslaut