gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Enable shell job control / don't catch Ctrl + Z

Open raphCode opened this issue 2 years ago • 4 comments

I like use my shell's job control features, but it seems Ctrl + Z is catched by gitui, so that nothing happens when I press it. Ideally, this would get me back to my shell, with gitui as a suspended background process. For now, I quit and restart gitui when I make up my mind or want to context switch, which clears the non-git state such as the selection cursor. I also don't really see where Ctrl + Z is used as a key shortcut, so it might even be unnecessary to catch it?

raphCode avatar Jan 12 '22 16:01 raphCode

Puh that is something.. not sure we can even „selectively“ catch key events or bubble them back up for your terminal to catch.

extrawurst avatar Jan 12 '22 16:01 extrawurst

I did some research:

  • I checked zellij's code because I know it can selectively catch Ctrl keycodes: It seems to use termion, while gitui uses crossterm
  • I tried to externally suspend gitui with SIGSTOP and resume it: UI is not rendered properly
  • I found this issue, which describes exactly the some symptoms as gitui: https://github.com/Byron/dua-cli/issues/65
  • This links to an issue in crossterm with lack of Ctrl Z support: https://github.com/crossterm-rs/crossterm/issues/494

So it seems the problem lies within crossterm and we just need to wait until it is fixed there?

raphCode avatar Jan 12 '22 22:01 raphCode

Thanks for the research! That’s great work

extrawurst avatar Jan 12 '22 23:01 extrawurst

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 13 '22 22:07 stale[bot]

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '24 15:03 stale[bot]