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,  7:42am, Daniel Shahaf wrote:
}
} 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.

It's not overloading WIDGET_INT, it's overloading ZLE_VIOPER - because
those are the only cases of builtins that want the opposite case (point
to the caller).  Testing WIDGET_INT is only necessary because the sense
of setbindk is reversed from the sense of ZLE_VIOPER.

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

At the moment that's not true; a widget implemented in shell can never
safely assume that $WIDGET points to itself.



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