helix
helix copied to clipboard
Add bracketed paste
This adds bracketed paste support to fix https://github.com/helix-editor/helix/issues/2239. It's based on this PR on crossterm, so that will need to land and be released before this can be merged.
I haven't done any serious benchmarking, but I tried the Moby Dick Workout. Pasting with this enabled took maybe a tenth of a second to get the whole meg of book in there. Without this, I think it would've taken a day or so.
Is there a need for Space-p after this is merged?
Yes, not all terminals support bracketed paste (I also prefer space+p over ctrl+v)
Looks like Windows sends paste events regardless, so we need to get this merged before 22.08 is released (ctrl+v panics on windows)
That's frustrating that Windows sends bracketed pastes regardless. This is ready to go as far as I know.
If this PR needs additional work, we could also disable the bracketed-paste feature in crossterm. That would turn off the parsing entirely. I'd prefer getting the PR in, naturally 😅