[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] Shift-F4 Repeat Last Search
From: |
Chris Allegretta |
Subject: |
[Nano-devel] Shift-F4 Repeat Last Search |
Date: |
Fri, 22 Oct 2004 17:30:52 -0400 |
User-agent: |
Mutt/1.3.28i |
[Re-sending & CCing the list]
Hi David,
Since I'm so out of the loop I didn't want to put this in 1.3
CVS without hearing your (and everyone's) feedback on this:
Meta keystrokes in gnome-terminal 'bleed' the held key when using Alt
(i.e. holding Alt-W will insert Ws into the file). Due to this, and due
to the fact that I will never be able to remember Meta-W is repeat last
search anyway, I created this patch, which also binds F16 (Shift+F4 in X
and Linux, at least on my box) to whereis_next. The downside is it
makes the help text look a little less pretty. Patch attached.
Chris A
--
Chris Allegretta http://www.asty.org
v1sw7CUPhw5ln6pr5ck4ma7u7LSIw0m5g/l7DRa27s5MRr3e6t5NLMb6TDp3en7g6M hackerkey.com
Index: src/global.c
===================================================================
RCS file: /cvsroot/nano/nano/src/global.c,v
retrieving revision 1.58
diff -u -r1.58 global.c
--- src/global.c 30 Sep 2004 22:07:21 -0000 1.58
+++ src/global.c 22 Oct 2004 21:27:09 -0000
@@ -582,7 +582,7 @@
sc_init_one(&main_list, NANO_NO_KEY, N_("Where Is Next"),
IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY),
- NANO_NO_KEY, NANO_NO_KEY, VIEW, do_research);
+ NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
#endif
free_shortcutage(&whereis_list);
Index: src/nano.c
===================================================================
RCS file: /cvsroot/nano/nano/src/nano.c,v
retrieving revision 1.175
diff -u -r1.175 nano.c
--- src/nano.c 22 Oct 2004 20:25:56 -0000 1.175
+++ src/nano.c 22 Oct 2004 21:27:12 -0000
@@ -442,8 +442,14 @@
/* Function key. */
if (s->funcval != NANO_NO_KEY) {
entries++;
- ptr += sprintf(ptr, "(F%d)", s->funcval - KEY_F0);
- *(ptr++) = '\t';
+ if (s->funcval > KEY_F(14)) {
+ ptr += sprintf(ptr, "(");
+ ptr += sprintf(ptr, _("Shift"));
+ ptr += sprintf(ptr, "+F%d)", s->funcval - KEY_F(12));
+ } else {
+ ptr += sprintf(ptr, "(F%d)", s->funcval - KEY_F0);
+ *(ptr++) = '\t';
+ }
}
/* Primary meta key sequence. */
Index: src/nano.h
===================================================================
RCS file: /cvsroot/nano/nano/src/nano.h,v
retrieving revision 1.56
diff -u -r1.56 nano.h
--- src/nano.h 14 Oct 2004 21:59:45 -0000 1.56
+++ src/nano.h 22 Oct 2004 21:27:13 -0000
@@ -397,6 +397,7 @@
#define NANO_WHEREIS_KEY NANO_CONTROL_W
#define NANO_WHEREIS_FKEY KEY_F(6)
#define NANO_WHEREIS_NEXT_KEY NANO_ALT_W
+#define NANO_WHEREIS_NEXT_FKEY KEY_F(16)
#define NANO_TOOTHERWHEREIS_KEY NANO_CONTROL_T
#define NANO_REPLACE_KEY NANO_CONTROL_4
#define NANO_REPLACE_FKEY KEY_F(14)
----- End forwarded message -----
Chris A
--
Chris Allegretta http://www.asty.org
v1sw7CUPhw5ln6pr5ck4ma7u7LSIw0m5g/l7DRa27s5MRr3e6t5NLMb6TDp3en7g6M hackerkey.com
pgp4oxWVrYqGZ.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] Shift-F4 Repeat Last Search,
Chris Allegretta <=