zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] [ping] Effect of "print -s" when called in zle widget not seen until zle is restarted
Date: Wed, 20 May 2020 22:09:45 -0700	[thread overview]
Message-ID: <CAH+w=7aScXnJAZQtsaMK-W3W6uqMoSL7bOJ+a7bEszjEBWCGHA@mail.gmail.com> (raw)
In-Reply-To: <20200510100727.j42omcak4lps55qo@chazelas.org>

On Sun, May 10, 2020 at 3:08 AM Stephane Chazelas <stephane@chazelas.org> wrote:
>
> [Repost as it looks like it was missed the first time round.]

I got it both times, FWIW.

> > function test_hist() {
> >     print -s "This is a test"
> > }
> >
> > If I call the function explicitly by typing test_hist, the
> > string is immediately added to the history, but if I call it
> > through the bindkey by pressing ctrl-x ctrl-t, the string is not
> > added to the history straight away. I need to issue another
> > command before I can see it in the history.
> >
> > Why is that, and how can I fix it?

I think that's actually intentional, and changing it might break
contributed functions such as zcalc, sticky-note, and nslookup.

There appears to be some interaction with "vared -h" that changes when
the ZLE_CMD_SET_HIST_LINE entry point is used.

      reply	other threads:[~2020-05-21  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 21:25 Stephane Chazelas
2020-05-10 10:07 ` [PATCH] [ping] " Stephane Chazelas
2020-05-21  5:09   ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7aScXnJAZQtsaMK-W3W6uqMoSL7bOJ+a7bEszjEBWCGHA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).