Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle -R glitch



I wrote:

> =?ISO-8859-1?Q?Johan_Sundstr=F6m?= wrote:
> 
> > Hi!
> > 
> > I just had a peek at the new (to me, at least) widget system, and
> > impressed as I am, I found something that might need some fixing. As
> > an exercise, I tried implementing a "what-line" function:
> > 
> > function what-line () { zle -R "Line $HISTNO" }
> > zle -N what-line
> > ...
> 
> That's how it should be. Note that the manual says that the string is
> displayed in the status line which is used by widgets to display
> strings *while the widget is active* (like M-x and some others do it).

Oops. Leaving the string displayed was, of course, already possible. Kinda.

  function what-line () {
    local key
    zle -R "Line $HISTNO"
    read -k key
    zle -U "$key"
  }

Hm. But the -M option is probably still good to have.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author