Re: patch: C-PGUP/DN will work in GNU screen in xterm
- From: Sean King <stking bway net>
- To: mc-devel gnome org
- Subject: Re: patch: C-PGUP/DN will work in GNU screen in xterm
- Date: Mon, 1 Sep 2003 04:24:55 -0400
On Mon, Sep 01, 2003 at 02:15:13AM -0400, Pavel Roskin wrote:
>
>
> I think it's a pretty dirty hack.
<chuckle> yeah, but it's not the _only_ 'is_an_xterm' type function
relying on WINDOWID.... ;-)
> WINDOWID doesn't mean that you are running xterm.
....as you see, I express some doubts in the comment....
> It may be another terminal emulator.
Absolutely -- IIRC, konsole _doesn't_ use WINDOWID, but I'll bet some of
'em do (I think they *all* _should_, actually...)
Well, maybe one could test, what.... Eterm? rxvt?
There's three possibilities, I guess:
Something bad happens under rxvt or what-have-you with
define_sequences (xterm_key_defines); (Already known perhaps?)
Nothing in particular happens.
Or --- perhaps --- it actually gets C-PGDN/UP working with
screen-under-rxvt-or-whatever TOO! ;-)
>
> It would be much better if screen just emulated xterm and used TERM=xterm.
Nah, screen is locked into vt100-ishness AFAICT...
What happens if you use TERM=xterm-*anything* with screen (*even if* the
terminfo db is simply the actual screen db *named* to
xterm-anything....) is, that the screen painting with mc's Ctrl-O
feature gets fouled up.... (the subshell works, but the screen is blank
-- you have to hit enter to get the prompt back. This is even _with_
'set altscreen on').
That's probably because screen's using strncmp( , "xterm", 5 ) _too_....
> I don't know, maybe it's supported already.
Well, one could write a patch for _screen_ I guess.... ;-)
Here's the thing: even if it is only screen-under-xterm that this patch
helps, it's worth doing _somehow_ if it can be done --
If the _only_ thing standing between screen's being able to use this
(important) bit of functionality is the _string_ "xterm" (and AFAICS
that's the case) then surely something other than, or in addition to
strncmp() should be used....
In other words, if a screen_under_xterm function _can_ be produced,
it should be.
AFAICT this works _perfectly_ with xterm, and that's not
insignificant -- a lot of people use xterm, after all. ;-)
There's gotta be a way to test for running-under-xterm-when-TERM=
something else (doesn't there? ;-)....
Maybe someone who knows more about this kind of coding (I generally run
to shellscripts and editor macros....) could come up with
something....
I mentioned XGetCommand -- I don't know how easy it is to get at the
info, but WM_COMMAND will always contain the command and arguments used
to invoke a terminal....
I certainly agree that if the function breaks something, or risks
breaking something, it needs to be extended -- but I think such a
function should _exist_.
Heck, if worst came to worst, one could just extend the function with a
few strncmp(termvalues,,) i.e. NOT eterm, NOT rxvt.... whatever
it takes. I certainly think it's worth doing!
Thanks for your reply!
best,
Sean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]