nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 6414b40d3d78efe6771bc55c2899e052d930336b
parent 91841895e0afb316124368bd8723eb823d4a7c89
Author: Chris Allegretta <chrisa@asty.org>
Date:   Fri, 21 Sep 2001 03:21:11 +0000

Make the Alt-key seqs work with the mouse


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@772 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 5+++++
Mnano.c | 5+++++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -16,6 +16,11 @@ CVS code - main() - Added vars oldcurrent and oldcurrent_x to check whether cursor pos has changed and if so update the pos with -c. + do_mouse() + - Send 27 when the menu item clicked is an alt key seq... The + lines aren't lined up since the menu width changed though, + this breakage depends on whether the new widths will be kept + or not (FEEDBACK!!) - nano.texi: - corrected the Mouse Toggle section, noticed by Daniel Bonniot. - winio.c: diff --git a/nano.c b/nano.c @@ -1750,6 +1750,11 @@ void do_mouse(void) /* And ungetch that value */ ungetch(val); + + /* And if it's an alt-key sequence, we should probably send alt + too ;-) */ + if (val >= 'a' && val <= 'z') + ungetch(27); } } #endif