changeset 411:664b94a58dbe

Add few comments.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 24 May 2012 06:23:43 +0300
parents 7ea78f4a4d23
children 3e64acb433e8
files nnchat.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/nnchat.c	Thu May 24 06:01:38 2012 +0300
+++ b/nnchat.c	Thu May 24 06:23:43 2012 +0300
@@ -1751,8 +1751,13 @@
             do
             {
                 c = wgetch(stdscr);
+                
+                /* Handle various problematic cases where terminal 
+                 * keycodes do not get properly translated by curses
+                 */
                 if (c == 0x1b)
                 {
+                    /* ^[O */
                     c = wgetch(stdscr);
                     if (c == 'O')
                     {
@@ -1771,6 +1776,7 @@
                             break;
                         }
                     }
+                    /* ^[[ */
                     else if (c == '[')
                     {
                         c = wgetch(stdscr);