From: simon Date: Thu, 17 Oct 2002 16:58:24 +0000 (+0000) Subject: Oops - that fix wasn't _quite_ right, since it killed all X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/5c0ea258b7f1d4725ddd717d9b6e9e7f8ec079f3 Oops - that fix wasn't _quite_ right, since it killed all non-function keys completely :-/ git-svn-id: svn://svn.tartarus.org/sgt/putty@2096 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/pterm.c b/unix/pterm.c index a4599587..a7c2f735 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -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 == '`' &&