vim scrolling in gnu screen broken (C-home/C-end)

Bug #353663 reported by FelixHummel
2
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

Versions:
- Ubuntu 8.10 (Intrepid Ibex)
- screen 4.00.03jw4 (FAU)
- Konsole: 2.1, Qt: 4.4.3, KDE: 4.1.4 (KDE 4.1.4)
- xterm: XTerm(235)
- vim: 7.1

While running vim in screen:
  expected:
  - Ctrl+Home/Ctrl+End move the cursor to the first/last character of the buffer
  actual:
  - Ctrl+Home moves cursor to 5th line and Ctrl+End does nothing.

I reproduced this bug on Konsole and xterm with a blank .screenrc (effectively using /etc/screenrc).

This bug is also mentioned here: http://liquidat.wordpress.com/2008/10/17/short-tip-gnu-screen-with-proper-scroll-session-management-support/

The line ``termcapinfo xterm* ti@:te@`` had no effect either.

It's interesting that ``sudo showkey`` followed by pressing Ctrl+Home returns the same value inside and outside screen: ^[[1;5H

tags: added: konsole screen vim xterm
affects: ubuntu → vim (Ubuntu)
Revision history for this message
Will Gray (graywh) wrote :

It's not interesting that ctrl-home generates the same key sequence inside and outside screen since that's a terminal emulator thing.

I believe the issue is that when TERM=screen, vim doesn't set the proper termcap settings for interpreting the modified home and end keys (and others). Compare :set <End> when running vim inside and outside screen. I use a vim plugin to set those options to always recognize the modifiers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.