summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9e201f7)
in the session name box. Thwarted on Unix by GTK not automatically
scrolling the listbox to the selected item, but we can fix that in
the platform-specific side later.
git-svn-id: svn://svn.tartarus.org/sgt/putty@6337
cda61777-01e9-0310-a592-
d414129be87e
dlg_update_done(ctrl, dlg);
}
} else if (event == EVENT_VALCHANGE) {
dlg_update_done(ctrl, dlg);
}
} else if (event == EVENT_VALCHANGE) {
+ int top, bottom, halfway, i;
if (ctrl == ssd->editbox) {
dlg_editbox_get(ctrl, dlg, savedsession,
SAVEDSESSION_LEN);
if (ctrl == ssd->editbox) {
dlg_editbox_get(ctrl, dlg, savedsession,
SAVEDSESSION_LEN);
+ top = ssd->sesslist.nsessions;
+ bottom = -1;
+ while (top-bottom > 1) {
+ halfway = (top+bottom)/2;
+ i = strcmp(savedsession, ssd->sesslist.sessions[halfway]);
+ if (i <= 0 ) {
+ top = halfway;
+ } else {
+ bottom = halfway;
+ }
+ }
+ if (top == ssd->sesslist.nsessions) {
+ top -= 1;
+ }
+ dlg_listbox_select(ssd->listbox, dlg, top);
}
} else if (event == EVENT_ACTION) {
if (!ssd->midsession &&
}
} else if (event == EVENT_ACTION) {
if (!ssd->midsession &&