3

I have a rather bizarre issue with terminal behaviour. If I execute tput clear to clear the screen, my cursor (as expected) goes to the top of the terminal.

If I run vi after that (vim actually), when it exits there are some blank lines before the next prompt. When I do that normally, the prompt simply shows up at the next line. The following shows a transcript after tput clear and running vi twice (simply exiting each time):

+--------------------------+
|pax> vi                   |
|                          |
|                          |
|                          |
|pax> vi                   |
|pax>                      |
:                          :
+--------------------------+

As you can see, the first execution left three blank lines between the prompts, the second left none.

Other terminal manipulation style programs like less don't exhibit this behaviour. There's nothing the least bit suspicious in my PS1 prompt variable, it's simply set to "pax> " with absolutely no funny characters or escape sequences. What could be causing it?

Environment: running Debian 7.3 (from /etc/debian_version), vim 7.3 (from vim --version), Gnome Terminal 3.4.1.1 (from gnome-terminal --version), uname -a output of:

Linux paxbox01 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux
0

For emulation issues, it's the version of the vte library that really matters. It received many relevant fixes around version 0.36; I'm afraid you're using an older one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy