mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
force listing in _complete_debug; make complist with list-scrolling stopt at the end of the list when prompt would scroll it out; fix _in_vared to handle `foo[bar]' (11565)
This commit is contained in:
parent
9121d78354
commit
6959ffd962
4 changed files with 33 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2000-05-25 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11565: Completion/Base/_in_vared, Completion/Commands/_complete_debug,
|
||||
Src/Zle/complist.c: force listing in _complete_debug; make
|
||||
complist with list-scrolling stopt at the end of the list when
|
||||
prompt would scroll it out; fix _in_vared to handle `foo[bar]'
|
||||
|
||||
2000-05-24 Peter Stephenson <pws@cambridgesiliconradio.com>
|
||||
|
||||
* 11561: Src/lex.c, Doc/Zsh/expn.yo: don't use RC_QUOTES in Posix
|
||||
|
|
|
@ -5,10 +5,17 @@ local also
|
|||
# Completion inside vared.
|
||||
|
||||
if [[ $compstate[vared] = *\[* ]]; then
|
||||
# vared on an array-element
|
||||
compstate[parameter]=${compstate[vared]%%\[*}
|
||||
compstate[context]=-value-
|
||||
also=value
|
||||
if [[ $compstate[vared] = *\]* ]]; then
|
||||
# vared on an array-element
|
||||
compstate[parameter]=${${compstate[vared]%%\]*}//\[/-}
|
||||
compstate[context]=value
|
||||
also=-value-
|
||||
else
|
||||
# vared on an array-value
|
||||
compstate[parameter]=${compstate[vared]%%\[*}
|
||||
compstate[context]=value
|
||||
also=-value-
|
||||
fi
|
||||
else
|
||||
# vared on a parameter, let's see if it is an array
|
||||
compstate[parameter]=$compstate[vared]
|
||||
|
|
|
@ -22,6 +22,7 @@ unsetopt xtrace
|
|||
# _message -r "Trace output left in $tmp (up-history to view)"
|
||||
# print -sR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w"
|
||||
_message -r "Trace output left in $tmp"
|
||||
compstate[list]='list force'
|
||||
print -zR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w"
|
||||
exec 2>&3 3>&-
|
||||
}
|
||||
|
|
|
@ -1302,36 +1302,41 @@ compprintlist(int showall)
|
|||
if (nlnct <= 1)
|
||||
mscroll = 0;
|
||||
if (clearflag) {
|
||||
int nl;
|
||||
|
||||
/* Move the cursor up to the prompt, if always_last_prompt *
|
||||
* is set and all that... */
|
||||
if (mlbeg >= 0) {
|
||||
if ((ml = listdat.nlines + nlnct) >= lines) {
|
||||
if ((nl = listdat.nlines + nlnct) >= lines) {
|
||||
if (mhasstat) {
|
||||
putc('\n', shout);
|
||||
compprintfmt(NULL, 0, 1, 1, mline, NULL);
|
||||
}
|
||||
ml = lines - 1;
|
||||
nl = lines - 1;
|
||||
} else
|
||||
ml--;
|
||||
tcmultout(TCUP, TCMULTUP, ml);
|
||||
nl--;
|
||||
tcmultout(TCUP, TCMULTUP, nl);
|
||||
showinglist = -1;
|
||||
|
||||
lastlistlen = listdat.nlines;
|
||||
} else if ((ml = listdat.nlines + nlnct - 1) < lines) {
|
||||
} else if ((nl = listdat.nlines + nlnct - 1) < lines) {
|
||||
if (mlbeg >= 0 && tccan(TCCLEAREOL))
|
||||
tcout(TCCLEAREOL);
|
||||
tcmultout(TCUP, TCMULTUP, ml);
|
||||
tcmultout(TCUP, TCMULTUP, nl);
|
||||
showinglist = -1;
|
||||
|
||||
lastlistlen = listdat.nlines;
|
||||
} else {
|
||||
clearflag = 0;
|
||||
if (!asked)
|
||||
if (!asked) {
|
||||
mrestlines = (ml + nlnct > lines);
|
||||
compprintnl(ml);
|
||||
}
|
||||
}
|
||||
} else if (!asked)
|
||||
} else if (!asked) {
|
||||
mrestlines = (ml + nlnct > lines);
|
||||
compprintnl(ml);
|
||||
|
||||
}
|
||||
listshown = (clearflag ? 1 : -1);
|
||||
mnew = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue