diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 4 | ||||
-rw-r--r-- | Src/Zle/complist.c | 16 |
3 files changed, 22 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 17f2429d3..14cc2d4a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-04-25 Sven Wischnowsky <wischnow@informatik.hu-berlin.de> + * 10916: Completion/Core/_main_complete, Src/Zle/complist.c: + re-calculate number of line with mark when needed; make default + prompts more consistent + * 10915: Src/Zle/computil.c: forgotten fix for _arguments using multiple actions diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 347326c49..54691a1b1 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -57,13 +57,13 @@ _def_menu_style=( "$_last_menu_style[@]" _last_menu_style=() zstyle -s ":completion:${curcontext}:default" list-prompt LISTPROMPT || - LISTPROMPT='Current position at %P Continue? ' + LISTPROMPT='%SCurrent position at %p: continue? %s' if [[ -n "$LISTPROMPT" ]]; then zmodload -i zsh/complist compstate[list_max]=scroll fi zstyle -s ":completion:${curcontext}:default" select-prompt SELECTPROMPT || - SELECTPROMPT='%SScrolling active: current selection at %p' + SELECTPROMPT='%SScrolling active: current selection at %p%s' zstyle -s ":completion:${curcontext}:default" select-scroll SELECTSCROLL || SELECTSCROLL=1 diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 48c216cf8..d0dd90bec 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1594,6 +1594,20 @@ domenuselect(Hookdef dummy, Chdata dat) mlines = 999999; mlbeg = 0; for (;;) { + if (mline < 0) { + int x, y; + Cmatch **p = mtab; + + for (y = 0; y < mlines; y++) { + for (x = mcols; x; x--, p++) + if (*p && **p && mselect == (**p)->gnum) + break; + if (x) + break; + } + if (y < mlines) + mline = y; + } space = lines - nlnct - mhasstat; while (mline < mlbeg) if ((mlbeg -= step) < 0) @@ -1999,12 +2013,14 @@ domenuselect(Hookdef dummy, Chdata dat) do_menucmp(0); mselect = (*(minfo.cur))->gnum; setwish = 1; + mline = -1; continue; } else if (cmd == Th(z_reversemenucomplete) || !strcmp(cmd->nam, "reverse-menu-complete")) { reversemenucomplete(zlenoargs); mselect = (*(minfo.cur))->gnum; setwish = 1; + mline = -1; continue; } else { ungetkeycmd(); |