diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-04-23 00:24:07 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-04-23 00:24:07 -0600 |
commit | e2e8488ca2d18f2b0eedaa1bfc6826e8a11de025 (patch) | |
tree | 9843fcc18bc7739fc3f45503baa51006bd49dabf /pico/display.c | |
parent | 69b0d3a5dff7b8be0deada358dad1a55f319d769 (diff) | |
download | alpine-e2e8488ca2d18f2b0eedaa1bfc6826e8a11de025.tar.xz |
* new version 2.20.7.
* Fix documentation for search to beginning and to end of line,
which had not been updated, even though the behavior had changed.
* Exact search is sticky, that is, once an exact search is done, so will
be the next ones. This is consistent with the default behavior where
all searches are not exact.
* Pico upgraded to versio 5.08.
* some hunks of integrate.patch were added to this source code
to make handling of menus consistent, and reduce the size of
integrate.patch at the same time.
Diffstat (limited to 'pico/display.c')
-rw-r--r-- | pico/display.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pico/display.c b/pico/display.c index 84edf18e..96e3adb8 100644 --- a/pico/display.c +++ b/pico/display.c @@ -1558,6 +1558,8 @@ writeachar(UCS ucs) * answer already typed in. Carriage return accepts the * default. answer returned in buf which also holds the initial * default, nbuf is its length, def set means use default value. + * In order to be able to eliminate keys from a menu, EXTRAKEYS + * always has size 10. */ int mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) @@ -1619,6 +1621,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) } #endif + memset(&menu_mlreply, 0, 12*sizeof(KEYMENU)); menu_mlreply[0].name = "^G"; menu_mlreply[0].label = N_("Get Help"); KS_OSDATASET(&menu_mlreply[0], KS_SCREENHELP); @@ -1627,9 +1630,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) KS_OSDATASET(&menu_mlreply[i], KS_NONE); rfkm[2*i][1] = 0; if(extras){ - for(; extras[j].name && j != 2*(i-1); j++) - ; - + j = 2*(i-1); if(extras[j].name){ rfkm[2*i][1] = extras[j].key; menu_mlreply[i].name = extras[j].name; @@ -1646,9 +1647,7 @@ mlreplyd(UCS *prompt, UCS *buf, int nbuf, int flg, EXTRAKEYS *extras) menu_mlreply[i].name = NULL; rfkm[2*(i-6)+1][1] = 0; if(extras){ - for(; extras[j].name && j != (2*(i-6)) - 1; j++) - ; - + j = 2*(i-6) - 1; if(extras[j].name){ rfkm[2*(i-6)+1][1] = extras[j].key; menu_mlreply[i].name = extras[j].name; |