Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] complist interactive mode overwrites command line



On Fri, Jul 22, 2022 at 9:32 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> % ls fo[] folder1
> folder1 folder2 folder3
>
> where "folder1" is selected and the "o" in "fo" at the prompt is
> highlighted in boldface.  If accept one of the menu choices (e.g.,
> press Enter):
>
> % ls folder1/o[] folder1

This seems to fix that, let's see if it handles your problem too.

diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 0dc64db6a..1b87103d7 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2447,6 +2447,9 @@ domenuselect(Hookdef dummy, Chdata dat)
             strncpy(zlemetaline, origline, l);
             zlemetacs = origcs;
             setmstatus(status, NULL, 0 , 0, NULL, NULL, NULL);
+        minfo.insc = minfo.end;
+        minfo.end -= minfo.len;
+        minfo.len = 0;
         } else if (strpfx("search", s)) {
             mode = (strstr(s, "back") ? MM_BSEARCH : MM_FSEARCH);
         }




Messages sorted by: Reverse Date, Date, Thread, Author