Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] complist interactive mode overwrites command line
- X-seq: zsh-workers 50423
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Andrea Manenti <andrea.manenti@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] complist interactive mode overwrites command line
- Date: Fri, 22 Jul 2022 10:55:53 -0700
- Archived-at: <https://zsh.org/workers/50423>
- In-reply-to: <CAH+w=7b=LF_YGXQBSqeMKuOSsGhFUzDUZFGgC_6XF1B+OxSuqw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <8964126.CDJkKcVGEf.ref@phy-nordri> <CAH+w=7Zq-0X1DnSW7vORP5B64PN0pzQ2UX2bDfWk8405YDXfrA@mail.gmail.com> <CAH+w=7ZHtt1g-vRAEsiKZHZ2rYZjQU4vMRqcM0Tq4XrkTqy2Cw@mail.gmail.com> <2844417.e9J7NaK4W3@phy-nordri> <CAH+w=7b=LF_YGXQBSqeMKuOSsGhFUzDUZFGgC_6XF1B+OxSuqw@mail.gmail.com>
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