From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22694 invoked from network); 16 Jul 2022 18:12:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Jul 2022 18:12:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1657995142; b=qT7FZMyrQL43U4LALwS+BhCE7yqy25Dz0P8KpBEwD+ZRrexVEmxqd3E5gzrsrErwr5lqtxrGKo qUhq0WH3d9A5aNfHFUn0ce6JvuamYLRyr7ygE3j+ImKovS1icB9YxivXlsM+pBDTKllpw80A1R X9hlp55QJDnSiCuFzOvXlTOK8tyhmqLw5oobyn3/KAt1Y00wOk0cjhFg/IqTzqmn3IHuKCHB8X 8qovfwi6qFufOHreP+rkYqTUv4rXjCHtTJSAOKLocbIR9QNzql0uTBaMl3+UR7kJShYcieU6uO CF0YtDNkrtNfoIoPesDqGFirj4b7b09USVpppRdK6Blivw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1657995142; bh=/v/YNSXxKmJQN2REtNsZv04hO2PEYPNcbiX+FGvnsT8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=AGnF7r6jrp+oDGldlvsI62RZWGd88f6KgTlY1Fuot3kxiQtege90KDrjmNM1bDDmWuKC7Hrogn KzNWESMgkD/uBa8Lx2Xe4j+VA6JQdKOp2OXCvTRVMyyPnrvqLDmURRA7AuiYMoHyfmUBJhaQRi wENWus0otckggNq9DsP/iaPyU37pM6Z34Nad0Fv74IN2CBLnVpaP22XlLG7bS8G4byqmXRNSBi Mprfo//1w5zQdD0TvyLt/JX67TpjT+JSwtYPzaMgBRSDmJHAeRQ5z3P68XzWaHx9I3KlEEWhVk 5gTIO4nSV62k03/dKM0eu4kfod9rAIADUil67vNjbxkZhA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=F3LHW4j1m5yewWEZtwtjI+LZDR5iDdOwLH3KoEwSwFQ=; b=P9uuleMkoTlL4BxbVM930J4mZZ d7sY+DydCJjuRXoh7RfzvI/jxwxgpBogXEMtUVLMCvLUmUQlE0fBC8klNf2hwEwz3D5FPG0TN/2s6 ZX5zxLw2v5H3vjMpYwGs/46DvU7qyZ5QnlrylgZfSs06E0JXdW72LW+DjYgAPpsfqJihE8snNYqg6 LPs0OJWKOUy/C64Aglv9yjKtlYCmWgy8Nc2Od2ZEUZrCdxyuTcuDd0RVRjATOhXmnePrmjPxzaBC/ f+skDU41QXNBLm0cm2KIKcKxrWeiNDXGlD5vc3vyAwzt7OMZdU8HTg9pP9ml3CH7bxJab0HtCb7bR sD4bYKXg==; Received: from authenticated user by zero.zsh.org with local id 1oCmH8-000IfV-1c; Sat, 16 Jul 2022 18:12:22 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f51.google.com ([209.85.208.51]:40582) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oCmGs-000IMG-0r; Sat, 16 Jul 2022 18:12:07 +0000 Received: by mail-ed1-f51.google.com with SMTP id r6so10145254edd.7 for ; Sat, 16 Jul 2022 11:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F3LHW4j1m5yewWEZtwtjI+LZDR5iDdOwLH3KoEwSwFQ=; b=vRyDXplRaIH4AOEfOJ3lpOgCIS3w2Wr8Fdvu3WSifbZ8Jp/Zy62QpCQPqv4nUZJAdn FsjF9FIvxjmj24NnkfDylm5VRq007LS7jD9Py4F+/dPy7Qf+HvpZ+A4KUZ2tMpnkBeyQ yJowvHwGX1VQmQVdGb7ZiND7UuRBKtNjiGL+Ot8NXRPeQVGiu0YSRQksAf9gC/J9fatc RnN8Q3RS40DFJ6LkgSyb8ID+cuUO5CxgiPqp/MLEptxsNmUQ8HIYzoHPijNhhzYtzZG/ CnHcZMfX/lMyNtmR9VQnUcBS19FQMyeTVqbvp188lIwbnQywva8gsdMB6xkRSNqERGTP E9zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F3LHW4j1m5yewWEZtwtjI+LZDR5iDdOwLH3KoEwSwFQ=; b=ZfP4gu0Z24jmJJeWQLNkjJmuzBuTLpTuzcvJoCmeyttV9D711AZwi1MfL2b3cwyPjT Wc8D506611TmVYnvDSTOD6ZP4iGHzx88fTZ9fDjTwHeytIehbeuyzBUOH+WwxF+JLW/5 3bdotLFVAG7MmiXc6dSdd1nLN1QHXm4dXZTzE0McwtKdrFunGbm2p73Ts4R63xdBLQv4 K4u7U6T5nj57rRKZRYN8LMoRDZmxW/VT0kDHm4PCfGIKVud+fKdWpQY8ea8Q7y4hVPDY yHi47vA4o1cHQqauPG2M2ED/Yto2fsYZvZzxeg08p8N3xrJmyvj9zy3z5qJvwsAB6fxH MkMg== X-Gm-Message-State: AJIora8OmbBqnLDDHPI7mD3o9I4yw0bItAdBkKrUQmcqaZpsTVMjsYkn Q5EpCbIpK0FdY9IOGa1LnUjGzackcUwGNpnfEyxCJw== X-Google-Smtp-Source: AGRyM1sQZsG+Qa0znZ5QXv2WQG5zba9FEBh6zEn4jR9hMbwW98rs7U3b0AumXBA72bTMiFzKh2qcL19CQKFgLXCJgIg= X-Received: by 2002:a05:6402:2554:b0:43a:902b:d31f with SMTP id l20-20020a056402255400b0043a902bd31fmr26901749edb.416.1657995125397; Sat, 16 Jul 2022 11:12:05 -0700 (PDT) MIME-Version: 1.0 References: <8964126.CDJkKcVGEf.ref@phy-nordri> <8964126.CDJkKcVGEf@phy-nordri> In-Reply-To: <8964126.CDJkKcVGEf@phy-nordri> From: Bart Schaefer Date: Sat, 16 Jul 2022 11:11:53 -0700 Message-ID: Subject: Re: [BUG] complist interactive mode overwrites command line To: Andrea Manenti Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 50413 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Fri, Jul 15, 2022 at 6:45 AM Andrea Manenti wrote: > > On Wed, 4 Aug 2021 19:30:10 +0300 Marlon Richert wrote: > > % zmodload zsh/complist > > % bindkey '^I' menu-select I don't know if this is also a new thing, but menu-selection also makes the display pretty confused when stepping through with the arrow keys if some of the entries are longer than will fit on the command line without wrapping at the right margin. Try it in a directory with a mix of very long and very short file names. > > % MENUMODE=interactive > > % touch test{1,2} > > % : ; foobar > > > ^ 1. Type the above line in its entirety. > > 2. Place the cursor before the ; > > 3. Press Tab. > > 4. Press Enter. > > % : test1 bar > > ^ Completion is written over existing buffer contents. > I am also experiencing this bug, I'm running zsh 5.9. The issue seems to be that interactive mode assumes you're going to use it interactively -- as in, type a single character at a time until you've reduced the set to only one match -- so it only adjusts the buffer spacing on single keystrokes. When you accept with TAB (or ENTER) domenuselect() is relying on do_single() to fix everything up, but the state required by do_single() is not fully populated. I don't know precisely what else is needed, though, and am out of time to study it today. > autoload -Uz compinit > compinit > > setopt noautomenu > setopt globcomplete > bindkey '^i' complete-word > setopt nolisttypes > > zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} > zstyle ':completion:*' menu yes select interactive This configuration doesn't appear to matter to the underlying issue.