Oops - that fix wasn't _quite_ right, since it killed all
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Oct 2002 16:58:24 +0000 (16:58 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 17 Oct 2002 16:58:24 +0000 (16:58 +0000)
non-function keys completely :-/

git-svn-id: svn://svn.tartarus.org/sgt/putty@2096 cda61777-01e9-0310-a592-d414129be87e

unix/pterm.c

index a459958..a7c2f73 100644 (file)
@@ -431,10 +431,11 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
        strncpy(output+1, event->string, 31);
        output[31] = '\0';
        end = strlen(output);
-       if (event->state & GDK_MOD1_MASK)
-           start = end = 0;
-       else
-           start = end = 1;
+       if (event->state & GDK_MOD1_MASK) {
+           start = 0;
+           if (end == 1) end = 0;
+       } else
+           start = 1;
 
        /* Control-` is the same as Control-\ (unless gtk has a better idea) */
        if (!event->string[0] && event->keyval == '`' &&