Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to avoid infinite recursion in ZLE widgets
- X-seq: zsh-users 26085
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to avoid infinite recursion in ZLE widgets
- Date: Fri, 25 Sep 2020 15:43:03 +0100 (BST)
- Archived-at: <https://zsh.org/users/26085>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-09/322971271.67362.1601044983375%40mail2.virginmedia.com>
- Authentication-results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1601044983; bh=gwRom+BBJ88TqMfQDrFbAILbg5kmhbZzc96okhw2DD8=; h=Date:From:To:In-Reply-To:References:Subject; b=5J4TK1MT2z4XTkr5qVSZsPiUUsGTbgyEw5PgykeNDaZZ09RmTGZJNLkWJ4Un4zPX/ 6TGszc4o0j4Mi+1kYcHAZ8gzy9JLKU+IxLsAkVfD43jFNuOru6lDUN1WWd21/P34ZT MFGFma9JT5mQ5vwYbqLGwkK3Lqc0exj0RglxT0NSWzTbmDmjVXjRbN+KAI+BmE5XNX rZ9/FkZuVZY2Dn1gf59kYIix4MJ8xOHstLrwixDcnXHPaSYFtZXSpU+G/kluZwyI2j Bdvrt4CNIya7LfdrFDbYv6J8K5S3OvtEOAIWLmLOFOQj0H2+aeUIe9siYUnVXKkzii CRMvwKd2P+Kvg==
- Importance: Medium
- In-reply-to: <CAC-uhUC8UY=SJTqdcAZM1Ja3AWAecvy7gcV0RVtKephttQRfRA@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <CAC-uhUD6-t3F0ZQuz1A_OWsFOJVj7L0dibNwbnDJurpq4-mZ+Q@mail.gmail.com> <20200923182558.nfokboenuhdypz45@localhost> <CAC-uhUAFiL=LfZZ+PcYRRHgZVTyYJ5rd4r6vFWQTfkHMFNc+gQ@mail.gmail.com> <CAC-uhUC8UY=SJTqdcAZM1Ja3AWAecvy7gcV0RVtKephttQRfRA@mail.gmail.com>
- Sender: zsh-users-request@xxxxxxx
> On 25 September 2020 at 15:19 Peter Slížik <peter.slizik@xxxxxxxxx> wrote:
> By the way, the documentation says that zle -R should be called after
> changing the command line from within a ZLE widget.
>
> However, when playing with LBUFFER and RBUFFER I realized that zle -R is
> not needed and the changes are visible immediately.
>
> Why is it so?
You only need to call zle -R either if you are passing it an argument
to show, or if you are bypassing the editor interface somehow so it
doesn't know the display has changed. If you use any of the special
variables or a zle command to update the command line then ZLE's
internals are all consistent and you don't need any special action.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author