mobile-shell / mosh

Mobile Shell
https://mosh.org
GNU General Public License v3.0
12.71k stars 743 forks source link

predictive echo fails to refresh on vim normal-mode O (capital o) #406

Open komidore64 opened 11 years ago

komidore64 commented 11 years ago

When I am editing a file in Vim (in normal-mode), then press O (capital-o) to insert a line above the current line, the terminal does not refresh to show the new line until I begin entering text.

mosh version I am using:

$ rpm -q mosh
mosh-1.2.3-1.fc18.x86_64
keithw commented 11 years ago

Hello,

I can't reproduce this. What outer terminal emulator are you using (e.g. gnome-terminal, rxvt, xterm)? How reliably does the issue happen, and can you give more detailed steps to reproduce?

Thanks, Keith

komidore64 commented 11 years ago

I am using urxvt256c, moshing (is this a verb yet?) into a tmux session with vim inside there.

Of course, as soon as I submit an issue, I can't reproduce it.

arcnmx commented 5 years ago

I run into this often and can reproduce this reliably with mosh+vim. It occurs when pressing ESC before O and exactly as the issue describes, the O does nothing and the terminal appears frozen and desync'd until you type any further text. Using a direction key instead followed by O works as expected.

andersk commented 5 years ago

What you’re seeing is the application-mode-to-normal-mode translation in terminaluserinput.cc. In this case vim has us in application mode so no translation should be necessary, but the state machine isn’t smart enough to know that so it pauses anyway.

There are some other apparent bugs there too: ESC ESC O A and ESC O ESC O A will slip past without being translated.