diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2013-05-01 01:00:38 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2013-05-01 01:00:38 -0400 |
commit | 81905f18dc0594e372cf38cfb0e0b71b69849a43 (patch) | |
tree | 8eb23ef6f907e1a4f53bd7c2247522b077037e63 /src/LYForms.c | |
parent | 7827f0bdba0c75376e59443975f3638df4cce044 (diff) | |
download | lynx-snapshots-81905f18dc0594e372cf38cfb0e0b71b69849a43.tar.gz |
snapshot of project "lynx", label v2-8-8dev-15b
Diffstat (limited to 'src/LYForms.c')
-rw-r--r-- | src/LYForms.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/LYForms.c b/src/LYForms.c index 10640fa5..75492637 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -1,4 +1,4 @@ -/* $LynxId: LYForms.c,v 1.98 2012/02/12 17:40:17 tom Exp $ */ +/* $LynxId: LYForms.c,v 1.101 2013/01/04 21:50:03 tom Exp $ */ #include <HTUtils.h> #include <HTCJK.h> #include <HTTP.h> @@ -65,8 +65,8 @@ int change_form_link_ex(int cur, int redraw_only) { FormInfo *form = links[cur].l_form; - char *link_name = form->name; - char *link_value = form->value; + char *link_name; + char *link_value; int newdoc_changed = 0; int c = DO_NOTHING; int title_adjust = (no_title ? -TITLE_LINES : 0); @@ -78,6 +78,8 @@ int change_form_link_ex(int cur, if (form == NULL) { return (c); } + link_name = form->name; + link_value = form->value; my_data = options_list(form->select_list); /* @@ -758,17 +760,23 @@ static int form_getstr(int cur, so we deduce it ourselves. We don't have the info to do it inside LYLineEdit(). This should work for prompts too. */ - if ((action != LYE_BACK_LL && action != LYE_FORW_RL) - || (cur >= 0 - && cur < nlinks - && (action == LYE_FORW_RL - ? cur < nlinks - 1 - : cur > 0) - && links[cur + ((action == LYE_FORW_RL) - ? 1 - : -1)].ly - == links[cur].ly)) + switch (action) { + case LYE_BACK_LL: + if (cur > 0 + && links[cur - 1].ly == links[cur].ly) { + goto breakfor; + } + break; + case LYE_FORW_RL: + if (cur >= 0 + && cur < nlinks - 1 + && links[cur + 1].ly == links[cur].ly) { + goto breakfor; + } + break; + default: goto breakfor; + } } #ifdef SUPPORT_MULTIBYTE_EDIT if (rc == 0) { |