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

Re: Off-by-one with select-*-shell-word text object?



Bart Schaefer wrote on Fri, Sep 16, 2016 at 20:02:05 -0700:
> On Sep 17,  1:30am, Oliver Kiddle wrote:
> } run-help, which-command and zap-to-char suffer from the same
> } issue as the text object widgets: they use bindk to select their
> } behaviour. 
> } 
> } So any thoughts on this solution?
> 
> I'd probably write it as an assignment of setbindk rather than put the
> whole expression in the execzlefunc argument, but otherwise this seems
> sensible on the face of it.

I think it would be cleaner to invent a new bitmask flag and set it on
the affected widgets (select-*-word, run-help, etc) than to overload
WIDGET_INT for this purpose.

Whether a widget is implemented in C or in shell has no bearing on
whether it assumes that $WIDGET points to itself.

Cheers,

Daniel



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