Description
As reported by @trixnz on gitter.
The fix for #2114 (5f16a29) made it so any fishscript run via bind commands runs with the terminal modes for external commands.
Those modes also include "echo", which means that, if input is received while a bind command is running, it may end up on screen.
This can cause the ending sequence for bracketed paste to appear. For some reason I've only been able to reproduce this on Ubuntu (20.04) on WSL2, which also happens to be quite sluggish, so it's possible there's a WSL interaction or timing exacerbating this. Neither Debian on WSL 1 nor Arch on bare metal exhibit the problem.
I'm not entirely sure what the proper fix here is. Maybe only donating the terminal for external commands, given that our builtins don't actually care about it?