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=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1914 invoked from network); 6 Nov 2023 21:53:59 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Nov 2023 21:53:59 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1699307639; b=EH4shnRSsn5V7jYMLFYxttuOkL5jIqkkNLuFLocLeZh4x+5x+t2WD5Nr6oH+Kcl4juTNIS2+SL 2y3ARckLk5Ai6sR/Anr+fnxzpYfEnT+7vOnY1FhGoBpMOtIOYEVMc7w/muGWAXLQgPfMDjFlZZ DbdM7CVIb28/vOmaGMqvhpU5uy+aM94yvJyfBWMIUvnfR2U1wHCJ9QFkcYHHC9ux1hM0eCZ1oe CqRhmGmt+3uTNmReOmzoBZpm3OjcgQQA4DHdY80vFFDczkrbKtRyoyRdP4xsglxVWvIf2qtULL tfMO5e4/EJsbrIijRG51HpjuNphU9Wm/m9nGz4CQZFzPjA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 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=1699307639; bh=Bub7Z7KkUGStfMX/e2at4SZmpJvcc7BM+0wcHIsJN2w=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=N/PTXG6jEQtC2cpsV18pnjFAstU8qC9jhAScjQ3zhxpmNgIbxDCmK6tUuQS38Cp2mtC2AORru7 gngkTILWTurMbKOjTzDfmC4clpj5S1nP/vpf9VmJ3Fv9uI/pW4oTyjGJyYIDV5LJhZq3cnAu8h TNAgJ6IUYr51wR55zXjBHbzMWo7RqgL3fgGc9pn5szWFscxO3+rZdNRPZxZ13KiUlrm2NZ4d+T tvgs/oONkob8n3vBTlGQ4zHOozedTWCq2bhVWne3mDZVKK49ee9fRdtm6HEY+J1iB5H6S+6ZW1 t8hPntZpTUthtk0IvVGxZSIzEcK8mlIqzPzmvYUMguVXKw==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YXLndMk1E4/qg/lED1EZoxoySsDqS+tKWZmavzV4b9A=; b=Ar2LSu2KLjwDNlm7N1D6oXG84N cOxJPwgoeublpHlWCRKqT+YKqRuAoD6f9/Y8h34JYscQX4DHCdqZzqb957DXYMPsRyfiGAM5b4pyy nEihHNaJY2S9LxqNDwMl+kGVEuPZGkCo1Yc17yVs9fq4g/P+bscGuhXBuTJJmdEhpPw1V1pbRq3vX dF0hLxI/XNCpETp6cQFnnYgQgkC0bPZsAw5nv5WSAoEAmtBadXv6U0kTA+CAzUEQCOxJg04wfqIkh 19mD07A/QlMW6XQ74vd4kwLjeIJOGVAwo75v5iTlq1otET417EUa81GO842CJgT8EaFLDAyJtu91R 7UBXo53Q==; Received: by zero.zsh.org with local id 1r07Xg-000DFR-Qw; Mon, 06 Nov 2023 21:53:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f48.google.com ([209.85.218.48]:45412) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1r07X7-000Cwo-Mi; Mon, 06 Nov 2023 21:53:23 +0000 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-9d216597f64so753023866b.3 for ; Mon, 06 Nov 2023 13:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1699307601; x=1699912401; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YXLndMk1E4/qg/lED1EZoxoySsDqS+tKWZmavzV4b9A=; b=FJ5PAxmaNHeBpm0+00A4hl//EUsT259tLIyvtkQS80o4tUtcjvqo6NNV3GQswvqFnS DAWOVqJLY7bBWp+CDuVg7Jwkkx8T4b0cyD9mLRplVOpUokASSgwxXBqV0dS2/0h4qxVp 4k0oFmMHEVHWXpk2x4wn4EYcCMGFGS72lZ2REYXc4Z6++Wy3lHn7qcj6qXXJd32Yd4fu Pk/YP9srFIs9Nqj/Ub8La13rJwdMAvbNNhzgiO7UbuUypEzSmr3WiaB7CUy8vJP10HJA TKQDQz0Bv332DAZM6Wjqz6cRMZiWFaGSsv+vSrEBJdtq968QsCmsX7IP+l8NbCROVMyk 6WEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699307601; x=1699912401; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YXLndMk1E4/qg/lED1EZoxoySsDqS+tKWZmavzV4b9A=; b=gyvyD9Bbe6h0E2w6l7S4pfUaw9b6M6uQIxHPUjmLRYwWnphnLMRwsR2C3Cv6Ck0mKf OQXpwJxKCgMHzhQphuNsblH21ubzhhB3qlxvRZ7CC0kwuQSEpshBKNL8ri9RE02P41V+ /uD4a+MaxQVZwx/4a/t5eeYAd8XElPfQZwjnXrl0riOl7zkr90joR+eM4i30K6tLZlNX eMkfX3ir4CG8nQwPa9zSTbc3e8LrJWF7KUr9dhDrl7JBfie4QalRhEgTojXXvgFBTioI 501w+PH1myxMceHOQmlhEpettQNQxTkeYUnAgh4DlhB/67+o8iVqAZYiMZUjNOJnuD4H 7FuQ== X-Gm-Message-State: AOJu0YzjVmNJtJYQJZZyMt0Ur8xjqjIJBQrHGj1vhQz81C8rj2I5TIDo tWZVKCkRemcLE9LDw6NbbCfpDR6r3Ff0co/F471s9Q== X-Google-Smtp-Source: AGHT+IEg3s1+qOCjl0E3ZMLh9sRxSz61XGGJz9GJNUqoP3MpTG8KLqybAL2wPeW36P+TcSG8JaEbEkMMyeRS6eGt65Y= X-Received: by 2002:a17:907:9405:b0:9b2:f941:6916 with SMTP id dk5-20020a170907940500b009b2f9416916mr14027462ejc.17.1699307600833; Mon, 06 Nov 2023 13:53:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 6 Nov 2023 13:53:09 -0800 Message-ID: Subject: Re: [BUG] compadd -R callback function not triggered by custom widget To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52277 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 Mon, Nov 6, 2023 at 3:49=E2=80=AFAM Marlon Richert wrote: > > However, if we do not call any built-in widget inside our custom widget, > then tst-suffix does not get called: I believe this is because you're in the menuselect keymap, which supports only a limited set of operations. When you hit ESC-i at this point without invoking any zle operations, you are still in menu mode, so the existing suffix is still active. You can see this if you immediately hit TAB again twice -- "asuffix" is replaced by "bsuffix" and the cursor is back at the end of the line again. Suffix removal is not invoked because as far as zle knows, you've never left the menu. If you call a builtin from tst-custom, the menu is aborted and you're back at the top-level. This could still be considered a bug -- changing CURSOR and possibly some other ZLE parameters during menu completion should also abort the menu. > Interestingly, if we then activate a built-in widget right after, > then tst-suffix gets called after all, but with the wrong value: > > # press Space > % len=3D0 : asuffix This actually isn't wrong (given the foregoing) -- Space breaks out of menu completion, so the suffix removal is invoked, and at that moment the cursor is at the beginning of the line so there is no LBUFFER so len=3D0.