1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 05:10:28 +02:00

zsh-workers/8437

This commit is contained in:
Tanaka Akira 1999-10-27 08:33:25 +00:00
parent 270b48432d
commit 6345ce7f64
3 changed files with 5 additions and 73 deletions

View file

@ -251,6 +251,7 @@ getcols(Listcols c)
/* Information about the list shown. */
static int noselect, mselect, inselect, mcol, mline, mcols, mlines, mmlen;
static int selected;
static Cmatch **mtab, **mmtabp;
static Cmgroup *mgtab, *mgtabp;
static struct listcols mcolors;
@ -567,6 +568,7 @@ domenuselect(Hookdef dummy, Chdata dat)
inselect = 1;
if (noselect)
break;
selected = 1;
if (!i) {
i = mcols * mlines;
while (i--)
@ -876,8 +878,9 @@ menuselect(char **args)
int d = 0;
if (!minfo.cur) {
selected = 0;
menucomplete(args);
if ((minfo.cur && minfo.asked == 2) || getsparam("ZLS_SELECT"))
if ((minfo.cur && minfo.asked == 2) || selected)
return 0;
d = 1;
}

View file

@ -68,75 +68,3 @@ clean-here: clean.zle
clean.zle:
rm -f zle_things.h zle_widget.h widgets.list thingies.list
Make
hasexport=1
moddeps="comp1"
autobins="bindkey vared zle"
objects="zle_bindings.o zle_hist.o zle_keymap.o zle_main.o \
zle_misc.o zle_move.o zle_params.o zle_refresh.o \
zle_thingy.o zle_tricky.o zle_utils.o zle_vi.o zle_word.o"
headers="zle.h zle_things.h"
:<<\Make
zle_things.h: thingies.list zle_things.sed
( \
echo '/** zle_things.h **/'; \
echo '/** indices of and pointers to known thingies **/'; \
echo; \
echo 'enum {'; \
sed -n -f $(sdir)/zle_things.sed < thingies.list; \
echo ' ZLE_BUILTIN_THINGY_COUNT'; \
echo '};'; \
) > $@
zle_widget.h: widgets.list zle_widget.sed
( \
echo '/** zle_widget.h **/'; \
echo '/** indices of and pointers to internal widgets **/'; \
echo; \
echo 'enum {'; \
sed -n -f $(sdir)/zle_widget.sed < widgets.list; \
echo ' ZLE_BUILTIN_WIDGET_COUNT'; \
echo '};'; \
) > $@
thingies.list: iwidgets.list
( \
echo '/** thingies.list **/'; \
echo '/** thingy structures for the known thingies **/'; \
echo; \
echo '/* format: T("name", TH_FLAGS, w_widget, t_nextthingy) */'; \
echo; \
sed -e 's/#.*//; /^$$/d; s/" *,.*/"/' \
-e 's/^"/T("/; s/$$/, 0,/; h' \
-e 's/-//g; s/^.*"\(.*\)".*/w_\1, t_D\1)/' \
-e 'H; g; s/\n/ /' \
< $(sdir)/iwidgets.list; \
sed -e 's/#.*//; /^$$/d; s/" *,.*/"/' \
-e 's/^"/T("./; s/$$/, TH_IMMORTAL,/; h' \
-e 's/-//g; s/^.*"\.\(.*\)".*/w_\1, t_\1)/' \
-e 'H; g; s/\n/ /' \
< $(sdir)/iwidgets.list; \
) > $@
widgets.list: iwidgets.list
( \
echo '/** widgets.list **/'; \
echo '/** widget structures for the internal widgets **/'; \
echo; \
echo '/* format: W(ZLE_FLAGS, t_firstname, functionname) */'; \
echo; \
sed -e 's/#.*//; /^$$/d; s/-//g' \
-e 's/^"\(.*\)" *, *\([^ ]*\) *, *\(.*\)/W(\3, t_\1, \2)/' \
< $(sdir)/iwidgets.list; \
) > $@
zle_bindings.o zle_bindings..o: zle_widget.h widgets.list thingies.list
clean-here: clean.zle
clean.zle:
rm -f zle_things.h zle_widget.h widgets.list thingies.list
Make

View file

@ -5915,6 +5915,7 @@ permmatches(int last)
hasperm = 1;
permmnum = mn - 1;
permgnum = gn - 1;
listdat.valid = 0;
return fi;
}