X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/5acdb74b14f86380cad192d90537f7b0cbc4c5e3..56668e6dca80813a2c9f03d4c02ed20e22f1061b:/config.c diff --git a/config.c b/config.c index de21cbbd..b0b0092c 100644 --- a/config.c +++ b/config.c @@ -529,12 +529,19 @@ static void sshbug_handler(union control *ctrl, void *dlg, { Conf *conf = (Conf *)data; if (event == EVENT_REFRESH) { + /* + * We must fetch the previously configured value from the Conf + * before we start modifying the drop-down list, otherwise the + * spurious SELCHANGE we trigger in the process will overwrite + * the value we wanted to keep. + */ + int oldconf = conf_get_int(conf, ctrl->listbox.context.i); dlg_update_start(ctrl, dlg); dlg_listbox_clear(ctrl, dlg); dlg_listbox_addwithid(ctrl, dlg, "Auto", AUTO); dlg_listbox_addwithid(ctrl, dlg, "Off", FORCE_OFF); dlg_listbox_addwithid(ctrl, dlg, "On", FORCE_ON); - switch (conf_get_int(conf, ctrl->listbox.context.i)) { + switch (oldconf) { case AUTO: dlg_listbox_select(ctrl, dlg, 0); break; case FORCE_OFF: dlg_listbox_select(ctrl, dlg, 1); break; case FORCE_ON: dlg_listbox_select(ctrl, dlg, 2); break; @@ -2450,6 +2457,9 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_droplist(s, "Chokes on SSH-2 ignore messages", '2', 20, HELPCTX(ssh_bugs_ignore2), sshbug_handler, I(CONF_sshbug_ignore2)); + ctrl_droplist(s, "Chokes on PuTTY's SSH-2 'winadj' requests", 'j', + 20, HELPCTX(ssh_bugs_winadj), + sshbug_handler, I(CONF_sshbug_winadj)); ctrl_droplist(s, "Miscomputes SSH-2 HMAC keys", 'm', 20, HELPCTX(ssh_bugs_hmac2), sshbug_handler, I(CONF_sshbug_hmac2));