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

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



On Sep 17,  1:30am, Oliver Kiddle wrote:
} Subject: Re: Off-by-one with select-*-shell-word text object?
}
} Bart wrote:
} > It also occurs to me to wonder whether set_bindk = 0 *ever* makes sense
} > for builtin widgets.  Can somebody give me an example of a builtin that
} > would care about the widget name of its user-defined caller?
} 
} I think it matters for the k2 == bindk test in getvirange().

That gets me wondering about the execzlefunc() call in getvirange().
E.g. in vicmd mode, cS changes nothing but leaves me in insert mode.
Probably should be an error to invoke any ZLE_VIOPER widget *other*
than the same one again?  But I digress ...

} zlecallhook sets set_bindk. That doesn't seem entirely useful

Actually it's quite useful, and the recently-added add-zle-hook-widget
function depends on it (to the point that zle-line-pre-redraw was
changed to match).

} 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.



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