From: Chris Allegretta Date: Wed, 5 Mar 2008 17:15:33 +0000 (+0000) Subject: Fixed bug 77 (make ^space and M-space work) X-Git-Tag: v2.1.0~21 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9b422202c1597e2d2f0b75cb6fc20bb850fb691c;p=nano.git Fixed bug 77 (make ^space and M-space work) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4217 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/BUGS b/BUGS index 61d61e8c..ee6fd273 100644 --- a/BUGS +++ b/BUGS @@ -8,7 +8,6 @@ of new if block for subnfunc values (75) - New backend code probably does not compile under anything but default options, if that (76) -- Meta-space and ^Space are not yet handled in new backend code (77) - -enable-tiny does not work with new code (78) @@ -151,5 +150,6 @@ - Home and End control keys (^A, ^E) do not always work in filename prompt (bug found by Ian Turner) (69) [1.0 series only] [FIXED]. - Trying to insert a file of 0 bytes will hang nano (70) [FIXED]. +- Meta-space and ^Space are not yet handled in new backend code (77) [FIXED] $Id$ diff --git a/src/global.c b/src/global.c index e33fde0d..e3f455b6 100644 --- a/src/global.c +++ b/src/global.c @@ -318,6 +318,13 @@ void assign_keyinfo(sc *s) s->seq = KEY_F0 + atoi(&s->keystr[1]); } else /* raw */ s->seq = (int) s->keystr[0]; + + /* Override some keys which don't bind as nicely as we'd like */ + if (s->type == CONTROL && (!strcasecmp(&s->keystr[1], "space"))) + s->seq = 0; + else if (s->type == META && (!strcasecmp(&s->keystr[2], "space"))) + s->seq = (int) ' '; + } #ifdef DEBUG