1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-06 09:01:13 +02:00

re-calculate number of line with mark when needed; make default prompts more consistent (10916)

This commit is contained in:
Sven Wischnowsky 2000-04-25 12:19:45 +00:00
parent 6e99acad52
commit d3c918b863
3 changed files with 22 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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();