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

Re: How to make underlining of a command line disappear after an ordinary key press? (2)



Hi Peter, 

You are right. I had missed the leading dot. 

However, as far as I can tell,   

ordinary-key-press(){ 
	if [[ $KEYS = [[:print:]] ]]; then
		region_highlight=("0 0 underline")
	fi
	zle .self-insert 
}

zle -N .self-insert ordinary-key-press
"""

does not remove the underlining at all. 

Apart from this, I also tried to rebind ALL printable keys 
seperately using a for loop. This did work, apart from rebinding 
the space bar. 

Any idea on how to rebind the space bar? (I made sure that space 
bar is not bound to magic-space.) 

Thanks a lot! 

Guido 

--- On Mon, 12/10/09, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:

> From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
> Subject: Re: How to make underlining of a command line disappear after an  ordinary key press? (2)
> To: zsh-users@xxxxxxxxxx
> Date: Monday, 12 October, 2009, 12:58 AM
[snip]
> Are you sure you called .self-insert and not self-insert
> within the new
> widget?  If you used self-insert the widget would call
> the function over
> and over, with that error.  If you use .self-insert
> you're guaranteed
> it's calling the internal widget and you can't get
> recursion.
[snip]
> if [[ $KEYS = [[:print:]] ]]; then
>   # reset behaviour for any printable character
> fi
> zle .self-insert
[snip]
> By the way, with space be sure it's not bound to
> magic-space.



      Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/



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