mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 00:41:44 +02:00
21596: fix run-help, which-command, accept-and-menu-complete
This commit is contained in:
parent
87ea1e9307
commit
817e59cf19
@ -1,3 +1,9 @@
|
||||
2005-08-10 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* 21596: Src/Zle/compresult.c, Src/Zle/zle_tricky.c: more fall out
|
||||
from 21590: run-help, which-command and accept-and-menu-complete
|
||||
were broken.
|
||||
|
||||
2005-08-10 Wayne Davison <wayned@users.sourceforge.net>
|
||||
|
||||
* unposted: Test/B02typeset.ztst: added "setopt localoptions"
|
||||
|
@ -687,6 +687,8 @@ instmatch(Cmatch m, int *scs)
|
||||
mod_export int
|
||||
hasbrpsfx(Cmatch m, char *pre, char *suf)
|
||||
{
|
||||
METACHECK();
|
||||
|
||||
if (m->flags & CMF_ALL)
|
||||
return 1;
|
||||
else {
|
||||
@ -1153,6 +1155,15 @@ do_single(Cmatch m)
|
||||
mod_export void
|
||||
do_menucmp(int lst)
|
||||
{
|
||||
int was_meta;
|
||||
|
||||
/* Already metafied when called from domenuselect already */
|
||||
if (zlemetaline == NULL) {
|
||||
was_meta = 0;
|
||||
metafy_line();
|
||||
} else
|
||||
was_meta = 1;
|
||||
|
||||
/* Just list the matches if the list was requested. */
|
||||
if (lst == COMP_LIST_COMPLETE) {
|
||||
showinglist = -2;
|
||||
@ -1173,13 +1184,10 @@ do_menucmp(int lst)
|
||||
(((*minfo.cur)->flags & (CMF_NOLIST | CMF_MULT)) &&
|
||||
(!(*minfo.cur)->str || !*(*minfo.cur)->str)));
|
||||
/* ... and insert it into the command line. */
|
||||
/* Already metafied when called from domenuselect already */
|
||||
if (zlemetaline == NULL) {
|
||||
metafy_line();
|
||||
do_single(*minfo.cur);
|
||||
|
||||
if (!was_meta)
|
||||
unmetafy_line();
|
||||
} else
|
||||
do_single(*minfo.cur);
|
||||
}
|
||||
|
||||
/**/
|
||||
|
@ -1800,6 +1800,8 @@ inststrlen(char *str, int move, int len)
|
||||
ZS_strncpy(zleline + zlecs, zlestr, zlelen);
|
||||
free(zlestr);
|
||||
zsfree((char *)instr);
|
||||
if (move)
|
||||
zlecs += len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user