Re: Patches for mc-4.5.51

On Sun, 12 Oct 2003, it was written:

> > I suggested that
> >
> >    || (!strncmp (term, "rxvt", 4))
> >
> > be added (takes care of rxvt _and_ derivatives)
> [..]
> > Not alone that nobody says, Great idea, thanks. (Maybe it _isn't_ a good
> > idea -- maybe I missed something.)
> Well, that code is broken anyway. In my opinion, you should never use
> hardcoded features based on the value of $TERM.
> xterm_flag and console_flag should be removed altogether in my opinion.

I agree with the later.  We need a single flag with bitmap values.
Actually, console_flag is not based on the terminal name.  It's based on
the major and minor numbers of the current terminal in case of Linux.

The ability to save screen as a whole in the xterm style can be found from
terminfo capabilities.

As for the extended keys, they are not in terminfo.  The whole reason for
having the table is to add keys in addition for to those from terminfo.

Of course we can support those keys if the terminal supports xterm buffer
switching, but I'm not convinced it's a cleaner solution than hardcoding a
few names.  Perhaps it's a worse solution.

Ideally, we need a dialog for setting terminal capabilities, perhaps as an
extension of "Display bits".  But I don't see any better way to set the
default list terminals with xterm-like key sequences other than
having a few names in the configuration files.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]