rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
677 stars 124 forks source link

git content to less, pagedown & end, conemu and busybox interact poorly #306

Closed doctorpangloss closed 1 year ago

doctorpangloss commented 1 year ago

ConEmu64_cAiyYRx8pK

Reproduction

  1. Clone a large git repo.
  2. Search its contents in the shell.
  3. Observe less is started. Hit End.
  4. Observe the terminal is glitched.
  5. Hit Ctrl+C.
  6. Observe the terminal is glitched. The status bar shows less.exe is still running, but you are interacting simultaneously with the shell and less.
  7. Carefully write pkill less to kill less.
  8. Observe the terminal is back in a normal state.

Reproducing on this repository:

git clone git@github.com:rmyorston/busybox-w32.git
cd busybox-w32
git rev-list --all | xargs git grep main.c

Then hit End. Then, good luck :)

doctorpangloss commented 1 year ago

The switching of terminal keyboard entry modes in the lower right should be a clue as to what is going on.

rmyorston commented 1 year ago

Please try the latest prerelease.

There have been some changes to how Ctrl-C is handled. In this case less no longer responds to Ctrl-C so it can't shut down unexpectedly and leave the terminal in a weird state.

I should add, it wasn't my intention to prevent less from handling Ctrl-C, it just seems to have happened as a side effect.

doctorpangloss commented 1 year ago

The issue still occurs. This time, I press Ctrl-C multiple times to trigger it.

rmyorston commented 1 year ago

OK, there's another new prerelease which might help.

Things I've noticed:

doctorpangloss commented 1 year ago

Okay, now hitting Ctrl+C no longer quits less (i.e. git for Windows less) and I must hit q to exit. This matches expectations with POSIX less.