dvtm icon indicating copy to clipboard operation
dvtm copied to clipboard

Prompt returns to the top of the window instead of 'left off' location

Open moyiz opened this issue 9 years ago • 1 comments

I'm not sure how to describe this issue properly so I've attached some screenshots. I start with a some what clean 3 window setup: screenshot at 2017-04-22 12-47-26

Then, I run some commands so the prompt will be lower in the window, and launch vim: screenshot at 2017-04-22 12-48-50

When I exit vim, the prompt returns to the top of the window, as you can see in the following screenshots (the cursor blinks on the 'l' of the 'locate' command). The desired behavior is for it to return at the same location where a CLI program was called. screenshot at 2017-04-22 12-49-15

After pressing some 'Enter's you can see that the prompt overrides outputs from previous commands. screenshot at 2017-04-22 12-51-33

I'm using mate-terminal + abduco + dvtm. I tried to mess a bit with DVTM_TERM / TERM, and tried using xterm instead of mate-terminal, but I get the same result. To be honest, I am not sure what causing it or even if it is a dvtm issue.

Thanks. (Edit: Fixed a typo) (Update: Solved by setting TERM as 'rxvt-256color' in bashrc, not sure why though)

moyiz avatar Apr 22 '17 10:04 moyiz

It looks related to the \033[?1049h escape sequence vim sends to save screen content and cursor position, and \033[?1049l used to restore screen and cursor position.

I can reproduce the issue with this in dvtm:

ls -a
printf '\033[?1049h'
pwd
printf '\033[?1049l'

May be related to vt.c#L968.

ghost avatar Apr 22 '17 10:04 ghost