mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 23:31:08 +02:00
re-calculate number of line with mark when needed; make default prompts more consistent (10916)
This commit is contained in:
parent
6e99acad52
commit
d3c918b863
3 changed files with 22 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
||||||
2000-04-25 Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
|
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
|
* 10915: Src/Zle/computil.c: forgotten fix for _arguments using
|
||||||
multiple actions
|
multiple actions
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,13 @@ _def_menu_style=( "$_last_menu_style[@]"
|
||||||
_last_menu_style=()
|
_last_menu_style=()
|
||||||
|
|
||||||
zstyle -s ":completion:${curcontext}:default" list-prompt LISTPROMPT ||
|
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
|
if [[ -n "$LISTPROMPT" ]]; then
|
||||||
zmodload -i zsh/complist
|
zmodload -i zsh/complist
|
||||||
compstate[list_max]=scroll
|
compstate[list_max]=scroll
|
||||||
fi
|
fi
|
||||||
zstyle -s ":completion:${curcontext}:default" select-prompt SELECTPROMPT ||
|
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 ||
|
zstyle -s ":completion:${curcontext}:default" select-scroll SELECTSCROLL ||
|
||||||
SELECTSCROLL=1
|
SELECTSCROLL=1
|
||||||
|
|
||||||
|
|
|
@ -1594,6 +1594,20 @@ domenuselect(Hookdef dummy, Chdata dat)
|
||||||
mlines = 999999;
|
mlines = 999999;
|
||||||
mlbeg = 0;
|
mlbeg = 0;
|
||||||
for (;;) {
|
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;
|
space = lines - nlnct - mhasstat;
|
||||||
while (mline < mlbeg)
|
while (mline < mlbeg)
|
||||||
if ((mlbeg -= step) < 0)
|
if ((mlbeg -= step) < 0)
|
||||||
|
@ -1999,12 +2013,14 @@ domenuselect(Hookdef dummy, Chdata dat)
|
||||||
do_menucmp(0);
|
do_menucmp(0);
|
||||||
mselect = (*(minfo.cur))->gnum;
|
mselect = (*(minfo.cur))->gnum;
|
||||||
setwish = 1;
|
setwish = 1;
|
||||||
|
mline = -1;
|
||||||
continue;
|
continue;
|
||||||
} else if (cmd == Th(z_reversemenucomplete) ||
|
} else if (cmd == Th(z_reversemenucomplete) ||
|
||||||
!strcmp(cmd->nam, "reverse-menu-complete")) {
|
!strcmp(cmd->nam, "reverse-menu-complete")) {
|
||||||
reversemenucomplete(zlenoargs);
|
reversemenucomplete(zlenoargs);
|
||||||
mselect = (*(minfo.cur))->gnum;
|
mselect = (*(minfo.cur))->gnum;
|
||||||
setwish = 1;
|
setwish = 1;
|
||||||
|
mline = -1;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
ungetkeycmd();
|
ungetkeycmd();
|
||||||
|
|
Loading…
Reference in a new issue