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

Re: PATCH: random attribute stuff



On May 6,  4:10pm, Peter Stephenson wrote:
}
} > It almost certainly *won't* work except in the most simple cases now that
} > ZLE is doing its own highlighting effects.  People are going to have to
} > decide whether they want that badly enough to use zle_highlight=(none).
} 
} I tried it without any highlighting.

It works for me in xterm if I e.g. assign PS1="$PS1%U" ... in fact for
the most part even the active region highlight doesn't screw it up, you
appear to be doing a good job of turning off only the seuqnces that you
previously turned on.  (I did not try more complicated effects than %U.)

(It's a bit odd that %U persists into the right prompt unless turned off
with PRS1="%u$RPS1" but it has always been that way.)
 
} It ought to be (but might turn out not to be) fairly easy to add a
} "default" element to zle_highlight that causes the given attributes to
} be used as the default set for the command line, which would probably
} work a lot better, and then deprecate any reliance on what the prompt
} happened to produce.

Sounds reasonable to me, but could get ugly if a widget were to change
it on the fly -- do you trap that and reprint the entire buffer, or do
you allow blotches of different attributes as areas are selectively
repainted, or do you make that setting read-only in widgets?



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