diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-10-30 14:13:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-10-30 14:13:36 +0000 |
commit | 006229c32e692a5aacbef1f6237b6b076ce1816f (patch) | |
tree | 01c150162e5d553555df29c6d267b6a0be504b27 /Src/Zle/compresult.c | |
parent | 9986ebfd3334ac58f81259d2ec276379c4c020ec (diff) | |
download | zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.tar.gz zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.tar.xz zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.zip |
22924: a couple more metafy_line()/unmetafy_line() problems
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r-- | Src/Zle/compresult.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 43dce9276..ebfb2cc47 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1225,6 +1225,8 @@ do_menucmp(int lst) int reverse_menu(UNUSED(Hookdef dummy), UNUSED(void *dummy2)) { + int was_meta; + do { if (minfo.cur == (minfo.group)->matches) { do { @@ -1239,9 +1241,16 @@ reverse_menu(UNUSED(Hookdef dummy), UNUSED(void *dummy2)) ((*minfo.cur)->flags & CMF_DUMMY) || (((*minfo.cur)->flags & (CMF_NOLIST | CMF_MULT)) && (!(*minfo.cur)->str || !*(*minfo.cur)->str))); - metafy_line(); + /* May already be metafied if called from within a selection */ + if (zlemetaline == NULL) { + metafy_line(); + was_meta = 0; + } + else + was_meta = 1; do_single(*(minfo.cur)); - unmetafy_line(); + if (!was_meta) + unmetafy_line(); return 0; } |