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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3373 invoked from network); 17 Jan 2023 00:02:31 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Jan 2023 00:02:31 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673913752; b=AbL+FdnTdcZWgpGa0Wpc58rKdgAedIWukrIytulAKI/cazyYH21O/RRiP1RuxbSd1wH2iTqZ2t Fv100qJkHeW9XqfwqQCWfRTKE8312mFpQCcGYXU2+3ra/VggGLSNwrChA5aJOkMFvwKaN8d+pc PfTB5rLBcFzCMHToS1ho6Ego7eA2VQWKwMqR3Hub3VcTlfq8LU/YRDdJGd43eGUKusYx1BRRCN eXJTsTACom/ZzbDd+EmcKycg3dcHDgugrsMmn/1utf0hu8rzcHjZbt5Y+RziCiMMQl8QLUHuOW eLxgetL4YhtPk5eAmtOE2osM1y9yFAvDL5fjRKR2UwEh5Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; 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=1673913752; bh=F+yOvMZBo2RbF5MsmtB+Xr+Q/2Za7yzxavW7aJdAvrg=; 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=XELBvEazDxLQR3pPK8rcvDZmYt5x17TknFgKsBojxx4Xb6SlV9h/qAcNof6BID40OBPG0+qUsy SGOUzvjAzLjnPg4btqx5Y2ZFO3PWdH/sle0OA8Ssv1Nj+VGGNZkh8N23vvgEnPtu5msPMC63pa u+2yYzqWDBmNOT5jZsYs4w90DJxtc6WYOpmckP+kCYYN/wQIXCL0Hd8085zEb5RYEkxdBROadc 5dlvvursJ9d5GJ7fThIZYegxrkDPeilDvCB2tRBzO18lFB+jdCMgMHeFmpOdiF66LNXN/0Xva9 p0trTbLhc15aHT+Y+vhI6Qc/ewhDGoJqtJRkS5C0Jqq0aQ==; 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=MCypUCfPmGSLLGJyXLNk4OVF5YiS2gC5vVohHGDHodM=; b=ptgMMWLbBnfEcv9xRdfwVbH1F1 Y9V5gmg1zseHDzNbReNT+s0h3728LS01iByDhDSpDKcCeOiER5HLu0ZyVkq8gJitPDjeWGzs21BLS nDw+eYxY63hyYdRy3GoxqBy7tM80szANf/1UgkoK5l2DzXp1rGoPy7o0iTgpzvwrYotzSSBgA2RTK Qc56MFmr4KFkIu2HJ9cTwRHNLEP/p3//VJNS/BrQWPim5uMc++/nORCwvJJJfNrGucdDhW70RrhZs fGClgKYD3WIwKv/w0g1U6bQjIsaWH6lf+vemLmH9W8sMw81r/t2YFCd4QvtHnKxQBOUF+9igTBw5m KpI0iLrg==; Received: by zero.zsh.org with local id 1pHZQt-0009UC-1c; Tue, 17 Jan 2023 00:02:31 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; 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-f48.google.com ([209.85.208.48]:46808) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pHZQI-00099O-3A; Tue, 17 Jan 2023 00:01:55 +0000 Received: by mail-ed1-f48.google.com with SMTP id x36so8128944ede.13 for ; Mon, 16 Jan 2023 16:01:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MCypUCfPmGSLLGJyXLNk4OVF5YiS2gC5vVohHGDHodM=; b=fZ+S6tz/L1wVbu32O/iu+xFe/hfpR1xJGWVcaH7Kan+f3wHYtY/SW2Y27+N4RufSfI wfkk8zmvWM5yh23QazbzV7dSpvEcSqhLzMDMz9Ezs3UKfAFeTqnR8fWtfoe6cE3HbZ7b j+OxBabLKm//kygjo1jpuLD2lDxNCrwbnOhh3BxzSetF/PEu9502B3RJ1ygCgNCFAr/F jCpmNLM6kxkWsTRRN3wYMVN8ul+9eexCWAvQJBvGzrsqlUqS/L6bfYdaRrK/IHi1Bckt jRcb9EEFjwPVlXHxBss0GJC2/aeO8W1dmh+1KBggxBTAtBJcfih+1f2MuHA77AwlLWiB X8WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=MCypUCfPmGSLLGJyXLNk4OVF5YiS2gC5vVohHGDHodM=; b=FAUl7IgMlk200pXTKe7StAhi8jJyqYhrrLAQ97FdMvfLPqTAZoHud5/gcdOD2KkjjG dMmGD9n+Xh8y5ZXdb7nmK1sGMsoYy/jySm1tLoj+qnuYRzk27yHde1svlrEvJgdr6Pmg UOiUZUFte9bBGYGxlyZy+J20jPYpEaW0r2+4GTPba+DC53MRnjhTctvVZGfNdXgXJFtF W9I64UYPfhG5fB3GSawUWXnf0BBBtvks9GvKbgmgtj7Au6GZMHfpK11g3Ti9PzKgv1pZ MCmpzR/BJAnGIcMp04/mu/CY89U6ERFiNBZyaPmZxJH2CXtP+sjcYwkSXqHm98B4lE/d iN3g== X-Gm-Message-State: AFqh2kpdj85RbyIseclBJKvnY0h0alHoY/9qrLI7A/Ztg8UpX8ypZcdf Ef3YjaGTznYlJsXODKTacFSP6qKLK7jVYIlJkMRrEw== X-Google-Smtp-Source: AMrXdXvDyMoXYGs7/mCwhQJMdAeiWi0R3nnr9CRKm6XhCznTTEVwbvddeV1wQBrh6BWWNkv4VgzOnBNVDqXe12W4/50= X-Received: by 2002:aa7:c61a:0:b0:49c:4298:2bb5 with SMTP id h26-20020aa7c61a000000b0049c42982bb5mr126815edq.366.1673913713528; Mon, 16 Jan 2023 16:01:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 16 Jan 2023 16:01:42 -0800 Message-ID: Subject: [PATCH] Re: Bug: Callback to widget set with `zle -Fw ` shouldn't change $LASTWIDGET To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51310 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: Is this good enough, or is there a need to consider that the handler might delete the previous last widget? What does/should happen in that case (or when a widget deletes itself, for that matter)? diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 686c6f5b4..cfa0a739d 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -737,6 +737,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full) ) { /* Handle the fd. */ char *fdbuf; + Thingy save_lbindk = lbindk; { char buf[BDIGBUFSIZE]; convbase(buf, lwatch_fd->fd, 10); @@ -779,6 +780,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full) */ errtry = 1; } + lbindk = save_lbindk; } } /* Function may have invalidated the display. */