Skip to content

Pressing ESC in vi causes SerialTerm to exit #2

@DavesCodeMusings

Description

@DavesCodeMusings

Problem:
When using SerialTerm to run vi on a serially connected Linux host, the ESC key does not behave properly. Instead of leaving edit mode, it exits SerialTerm and dumps back to the PowerShell prompt. The host is then left with vi running, which causes problems reconnecting.

Expected behavior:
Pressing ESC in vi should exit edit mode in vi, not exit SerialTerm.

Steps to reproduce:

  1. Attach to serial console on a Raspberry Pi or other Linux host with TTL serial.
  2. Run vi /tmp/test.txt
  3. Press ESC to exit edit mode.
  4. Notice how SerialTerm closes the connection and drops back to the PowerShell prompt with a ^[ sequence displayed. Further attempts to attach to the console with SerialTerm result in error.

Also, I don't get vi's status footer like expected and somehow end up in replace mode when vi starts. Guessing the escape sequence for request cursor position (to display the coordinates in the footer) is maybe not implemented? (ESC[6n, request cursor position, would reply back with ESC[#;#R and the R might trigger vi's replace mode. ???)

No biggie, I can still use nano for edits, but if it's not a difficult fix, it would be nice to have vi working. Still a fabulous tool, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions