Bug#741400: Support for %e and %c termcap

Celelibi celelibi at gmail.com
Wed Mar 12 03:53:01 UTC 2014


Package: vim
Version: 2:7.4.161-1
Severity: normal

Dear maintainer,

This bug may be somehow related to bug #264023.

It appears that vim has some special cases (for $TERM=xterm) harcoded
to parse some xterm escape sequences. Especially those that corresponds
to <S-PageUp> and <S-PageDown>.

Indeed, no matter the content of the terminfo file, vim only recognize
the escape sequence \E[5;2~ to be <S-PageUp> when the environment
variable TERM is "xterm". It looks like vim do not even bother to lookup
the terminfo file or understand the kPRV terminfo to mean <S-PageUp>.

To be more specific, I modified my terminfo for "screen" terminal to
include: kPRV=\E[5;2~ and kNXT=\E[6;2~ .
These are the escape sequences sent by xterm for <S-PageUp> and
<S-PageDown> and that are repeated by Screen. And to be precise, I use
the keypad PageUp and PageDown keys.

When I run vim in xterm, everything work as intended. When I run vim in
screen (in xterm), <C-K><S-PageUp> show "[5;2~" instead of "<S-PageUp>".

- It's not that my terminfo file for screen isn't actually used. The other
keys I added work.

- It's not the content of the terminfo file that is buggy since swapping
the terminfo files for xterm and screen doesn't change the behavior.

- It's not a vim special case on that escape sequence since mapping
  another escape sequence (known to work) to kPRV still doesn't work.

- It seems that it's only related to the content of $TERM environment
  variable since changing its value inside or outside screen always
  produce the same results. With TERM=xterm, <S-pageUp> works, with
  TERM=screen, it doesn't work.

Therefore, my best guess is that vim do not know about kPRV terminfo and
only generate <S-PageUp> events in gvim or when the terminal is xterm.

If needed, I can provide both the source and the binary form of my
modified terminfo file for screen.

Regards,
Celelibi


-- Package-specific info:

--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.gtk
/usr/bin/vim is /usr/bin/vim.gtk
/usr/bin/gvim is /usr/bin/vim.gtk

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.10.11 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vim depends on:
ii  libacl1      2.2.52-1
ii  libc6        2.18-4
ii  libgpm2      1.20.4-6.1
ii  libselinux1  2.2.2-1
ii  libtinfo5    5.9+20140118-1
ii  vim-common   2:7.4.161-1
ii  vim-runtime  2:7.4.161-1

vim recommends no packages.

Versions of packages vim suggests:
ii  exuberant-ctags [ctags]  1:5.9~svn20110310-7
pn  vim-doc                  <none>
pn  vim-scripts              <none>

-- no debconf information



More information about the pkg-vim-maintainers mailing list