copy_mode: implement `MoveToBlankLine`
This is equivalent to the previous-paragraph and next-paragraph bindings in tmux.
Closes #7079
If this looks good, let me know and I can write some tests and docs for it! I'm not sure if we want this to be a more general mechanism like jumping to a line that matches a pattern.
TODO:
- [x] Docs
- [ ] Tests
Usage:
local wezterm = require 'wezterm'
local act = wezterm.action
return {
key_tables = {
copy_mode = {
{
key = "{",
action = act.CopyMode { MoveToBlankLine = "Up" },
},
{
key = "}",
action = act.CopyMode { MoveToBlankLine = "Down" },
},
},
},
}
Hello, thanks for the contribution!
What's your reasoning for allowing any number instead of just -1/1 for a direction?
If you want to allow skipping multiple paragraphs this can already be done using the Multiple action if the user wants.
@bew No real reason, happy to cut that feature if you'd like.
I this it'll be easier to make sense of and describe, and it's still easy to add back if needed
@bew Done, now it takes a direction parameter: act.CopyMode { MoveToBlankLine = "Up" }.
Added the requested doc comments, I still need to add docs to the manual + tests. Thanks for the review!
@bew Added docs, PTAL :)