akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.71k stars 136 forks source link

Incorrectly redrawn prompt and history entries on bash 5 #526

Open wyuenho opened 3 years ago

wyuenho commented 3 years ago

This is tested on emacs 28 and macOS Big Sur running Macport's bash 5.1.

Reproduction:

  1. Remove all bash config files in home dir
  2. (setf vterm-shell "/path/to/bash5") ;; on macports it's /opt/local/bin/bash
  3. M-x vterm
  4. Press up to cycle history, you can see now all history entries get appended on the same line
  5. Press M-x to focus on the minibuffer
  6. C-g to focus back to the vterm. Now the prompt has been redrawn twice on a new lines and indented.

Workaround:

These problems go away when I set vterm-shell to the system's default bash 3 executable.

Screenshot 2021-05-18 at 02 18 24
wyuenho commented 3 years ago

Related: backspace also doesn't work on bash 5

wyuenho commented 3 years ago

Ok this issue seems to have gone away by itself.

wyuenho commented 3 years ago

Sorry this is still happening, but it seems to be specific to machine. I'll need to dig deeper into why this doesn't happen on my personal machine but it's happening on my work machine, both using the same configs.