]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Oops - that fix wasn't _quite_ right, since it killed all
authorSimon Tatham <anakin@pobox.com>
Thu, 17 Oct 2002 16:58:24 +0000 (16:58 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 17 Oct 2002 16:58:24 +0000 (16:58 +0000)
non-function keys completely :-/

[originally from svn r2096]

unix/pterm.c

index a459958741533bd247cc21434ec693e3e14c74fb..a7c2f735d091c4ed9ce5ad3c9ba69d96c604bcb3 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 == '`' &&