On Wed, Mar 07, 2001 at 01:17:45AM +1100, Geoff Wing wrote: > Marius Gedminas <[EMAIL PROTECTED]> typed: > :Currently I have made some changes to rxvt. I'd like to ask if you are > :interested in any of them, and if I should post them here. > > Certainly, please post them. It would be much appreciated if you > could post each patch in a seperate message so that they can be > addressed individually. Ok. I'm attaching the first one -- KP_Insert/KP_Delete fixes. (Actually, I posted that one a month ago, but it wasn't noticed by anyone.) > - Tripple click selects from word under cursor to end of line (SELECT_TO_EOL) > > Dominik Vogt made an alternative suggestion quite a while back where > triple clicking would select the word under the cursor until the > last word in a continued line set. e.g. suppose the end of the > terminal window is here -->| > % this is some foo bar example |<--wrapped here with no return pressed > text | > > then triple click on "foo" would select "foo" to "text". This seems to > be quite useful behaviour in a shell. Don't know whether you would prefer > that behaviour or consider it as an addition to your SELECT_TO_EOL idea. My patch actually tries to copy Eterm's default behavior (minus bugs ;). And selecting continued lines is not very difficult -- you can just tripple click the first word and move the mouse vertically down to the last line. With double clicks you would also have to move horizontally to the last word. The more I think about this suggestion the better it sounds. I'll look into it. Marius Gedminas -- Never trust an operating system you don't have sources for.
Hello, This is a patch for rxvt-CVS that makes XK_KP_Insert and XK_KP_Delete work like the rest of XK_KP_xxx family (according to application keypad mode and shift state). This is consistent with XFree86 xterm and IMHO generally the Right Thing (TM). BTW are there any patch submission guidelines? I just did a cvs diff -u in .../rxvt/ Index: src/command.c =================================================================== RCS file: /cvsroot/rxvt/rxvt/src/command.c,v retrieving revision 1.197 diff -u -r1.197 command.c --- src/command.c 2001/01/30 19:57:51 1.197 +++ src/command.c 2001/02/05 15:40:06 @@ -25,6 +25,8 @@ * Copyright (C) 1998,1999,2000 Geoff Wing <[EMAIL PROTECTED]> * - extensive modifications * Copyright (C) 1998 Alfredo K. Kojima <[EMAIL PROTECTED]> + * Copyright (C) 2001 Marius Gedminas <[EMAIL PROTECTED]> + * - KP_Insert/KP_Delete fixes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -238,6 +240,15 @@ break; #endif #ifndef NO_DELETE_KEY +# ifdef XK_KP_Delete + case XK_KP_Delete: + /* allow shift to override */ + if ((r->h->PrivateModes & PrivMode_aplKP) ? !shft : shft) { + STRCPY(kbuf, "\033On"); + break; + } + /* FALLTHROUGH */ +# endif case XK_Delete: STRCPY(kbuf, r->h->key_delete); break; @@ -320,15 +331,8 @@ case XK_KP_Begin: STRCPY(kbuf, "\033Ou"); break; - - case XK_KP_Insert: - STRCPY(kbuf, "\033Op"); - break; - - case XK_KP_Delete: - STRCPY(kbuf, "\033On"); - break; #endif + case XK_KP_F1: /* "\033OP" */ case XK_KP_F2: /* "\033OQ" */ case XK_KP_F3: /* "\033OR" */ @@ -366,9 +370,20 @@ case XK_Find: STRCPY(kbuf, "\033[1~"); break; + +#ifdef XK_KP_Insert + case XK_KP_Insert: + /* allow shift to override */ + if ((r->h->PrivateModes & PrivMode_aplKP) ? !shft : shft) { + STRCPY(kbuf, "\033Op"); + break; + } + /* FALLTHROUGH */ +#endif case XK_Insert: STRCPY(kbuf, "\033[2~"); break; + #ifdef DXK_Remove /* support for DEC remove like key */ case DXK_Remove: /* FALLTHROUGH */ Marius Gedminas -- This sentence does in fact not have the property it claims not to have.
