:execute "set t_kP=\<Esc>[5;*~"

etc, may be used in lieu of my versions, to avoid literal escapes in the
vimrc.

> I wonder why vim assumes to have anything other than an a vt100 compat
term if it has a non-specified TERM var

Not sure what you mean: "screen" isn't a non-specified term, and it has
terminfo capabilities. And, vim does in fact assume vt100 (ansi) if TERM
isn't set. But, as you've already said, vt100 has no notion of Control-
PageUp. The real problem is that there's just no way to specify, using
terminfo or termcap, what Control-PageUp will look like in terms of
control sequences.

The above isn't /precisely/ true: AFAICT, vim would recognize its
special "*" notation even if it came from terminfo; it's just that using
that syntax would then break pretty much any other terminal program's
ability to recognize (regular) PageUps.

> on a philosophical note, should a bug ever be rejected just because no
one can think of a fix?

*sheepish grin*

I'm not sure about that. You are certainly welcome to reopen this bug,
if you'd like. I mostly closed it because I figured you'd be okay with
doing that, given my explanation. I do think that, in a case where a fix
is truly impossible in every sense of the word, closing the bug is
entirely appropriate.

But in this case, a fix is, technically, not completely impossible; just
very involved. The right (and AFAICT, only) fix for this would be to (1)
enhance ncurses/terminfo to provide a way to specify how various special
keys should look if they have modifiers; (2) enhance screen to support
this mechanism and process/translate modifier/special-key combos; and
(3) enhance vim to understand and support this mechanism. So, rather
than open this general bug, perhaps opening these three bugs
(consecutively, not simultaneously) would be preferable.

This really needs to happen at some point—or, if not this, I would love
to see terminfo at least provide support for xterm-style or gpm-style
mouse tracking (I just dealt with a similar bug involving vim's
inability to detect mouse support in screen: fortunately, that one was
fixable, but the ideal solution would still have been in terminfo).

I'll tell you what: let's leave this bug closed, and I'll file a bug
against ncurses, and get some discussion going upstream. If I don't
leave a comment on this bug pointing to the new bug within a reasonable
amount of time, reopen it. :)

-- 
Screen mistakingly catches Control-PgUp Control-PgDown
https://bugs.launchpad.net/bugs/82708
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to