Comment 9 for bug 82708

Revision history for this message
Micah Cowan (micahcowan) wrote :

Heh. Since the time this bug was filed, I've become an upstream co-maintainer for GNU screen ^_^

Thanks for your patience. I've only recently discovered the full truth of this issue.

As previously mentioned, there are three parts to this: (1) ncurses, (2) screen, and (3) vim. As it turns out, (1) was somewhat wrong, because terminfo has _long_ supported, via extension features, specification of various modified keys; however, the stock terminfo definitions from ncurses don't include control-pageup/pagedown, though they _do_ support control-left, control-right... Debian/Ubuntu's terminfo definitions don't include any of the extended features. So there would still be a terminfo enhancement to include those definitions (probably named kPRV5 and kNXT5).

(2) is more-or-less this bug, tracked upstream at savannah: https://savannah.gnu.org/bugs/?24076

(3) requires modifying vim to use terminfo entries, whereas it currently uses termcap entries. You'll probably have to convince Bram Moolenaar of that. A good start would be to file a bug (upstream, ideally, or at least reported to the mailing list; I don't think they have a bugtracker) to support terminfo's kLFT5, etc, names, to indicate (in that example) control-left-arrow. This is a fairly involved change in vim, so it might take some effort to get that going. I suspect folks may have already broached the subject of terminfo support for vim: it's possible that Bram nixed it. You might snoop around the mailing list archives to see if there's anything to dig up.

Note that none of these things are bugs, they're enhancements. It may be that Blueprints is a more appropriate place to track this, but I'm not really sure. If the bug-tracker's appropriate for these issues, then this should probably be split apart for the three different issues. If this one is reopened against screen, the title should be changed, as screen isn't actually catching or transforming anything: it's passing the escape sequence through as-is, without modification.

Hope that helps.