Due to this matching && and ||, the widget will prepend to a partial command in [[ tests ]] and ((arithmetic tests)).
I would not expect a user to be running this widget while on a test, and it isn't clear what correct behaviour under this circumstance would be. Until a use-case requires this, this will remain low priority.