nano

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

commit e00b3e85876b6a0cf09d83375631e3c5bdf8ee0b
parent 87e963a2c75f850cbfaa202edf7b18c106478710
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Thu, 11 Jun 2015 19:01:28 +0000

Making it easy to see what codes a key stroke produces when debugging.


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

Diffstat:
MChangeLog | 4++++
Msrc/winio.c | 8+++++++-
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +2015-06-11 Benno Schulenberg <bensberg@justemail.net> + * src/winio.c (get_key_buffer): Add some debugging code to make it + easy to see what codes a key stroke produces. + 2015-06-07 Benno Schulenberg <bensberg@justemail.net> * doc/texinfo/nano.texi: Show the node with the command-line options in the main menu, to make it easy to find. diff --git a/src/winio.c b/src/winio.c @@ -181,7 +181,13 @@ void get_key_buffer(WINDOW *win) nodelay(win, FALSE); #ifdef DEBUG - fprintf(stderr, "get_key_buffer(): key_buffer_len = %lu\n", (unsigned long)key_buffer_len); + { + size_t i; + fprintf(stderr, "get_key_buffer(): the series of codes:"); + for (i = 0; i < key_buffer_len; i++) + fprintf(stderr, " %3x", key_buffer[i]); + fprintf(stderr, "\n"); + } #endif }