directvt/vtm

`Enter` is bind to `\C-j`(`\n`) instead of `\C-m`(`\r`) in linux `vtm` applications

Fan-iX opened this issue · 3 comments

Minimal reproducible example:

  • wsl - bash - ctrl+q - Enter gives ^M after the prompt. (expected)
  • wsl - vtm(v0.9.34) - bash - ctrl+q - Enter gives a new line (actually a ^J, or ctrl+q-ctrl+j) after the prompt. (unexpected)
  • powershell - vtm ssh wsl vtm(both v0.9.34) - bash - ctrl+q - Enter gives ^M after the prompt. (unexpectedly expected)

Why it affects

I have a

"\C-j":self-insert

in my .inputrc. When I type ctrl+enter or ctrl+j, it inserts a new line in the prompt line, so that I can create a multi-line prompt command. When I type enter or ctrl+m, (which sends ^M in common cases) the command is submitted.

But now I'm no longer able to submit commands in this way.

This can be easily confirmed through a single bash command bind '"\C-j":self-insert'.

This is due to the new input parsing mechanism for Linux. I'll try to fix this. Thanks for the report.

I think I've fixed this issue. You can test it.

Looks fine to me.

Thanks. 😄