detection of xterm mouse support

Pavel Roskin proski at gnu.org
Thu Jan 3 00:32:02 UTC 2002


Hi, Oskar!

Sorry for the late reply.  I like your patch, but it has a side effect:

TERM=ansi mc -x

on rxvt doesn't enable the mouse.  Your patch changes the meaning of "-x"  
- now it forces only xterm-style save/restore of the screen and the hints
in the caption, but not the xterm mouse support.

This would require changes in the documentation and the help.  I don't
want to do it at this point, because many translations will have to be
changed.

I would rather remove the "-x" option completely.  It has been broken for
a long time anyway.  This would mean that xterm hintbar and xterm
save/restore will only work on the terminals explicitly recognized as
xterm.  It would be possible to change the code later so that those
capabilities are also detected automatically, like the xterm mouse
support.

In general, I think that the situation with termcap correctness is getting
better over time.  MC uses many options that allow users to override
broken termcap database.  However, many of those options are hacks that
make the code very fragile.  They also are used in a very inconsistent
manner.  Say, the "-c" option has a corresponding per-terminal setting in
the config file, but the "-a", "-d" and "-x" options don't, although they
are as much terminal-specific as "-c".

My plan is to apply your patch and remove "-x" support in the same time.  
If anybody will need "-x", it will be reimplemented as a per-terminal
setting.  Please let me know if it's fine with you.

-- 
Regards,
Pavel Roskin




More information about the mc-devel mailing list