Implement custom OSC(?) to set a jump mark, and add key binding to jump to it
Mainly intended to be able to jump to the beginning of the previous command. This could be done by configuring the shell to emit the escape (in e.g.
In its simplest form, we would only keep track of one jump mark. But it shouldn't be too difficult to extend it.
I believe iTerm2 has this feature. It might make sense to re-use the same escape(s).
OSC 133;A is a fairly standard escape to mark the start of a prompt. See "Shell Integration/FinalTerm" in https://iterm2.com/3.0/documentation-one-page.html.
My plan is to have a per-row boolean value that indicates whether there's a prompt on this row or not. It is set on the "current" row when we receive a
OSC 133;A sequence.
Then, we'll add two key bindings,
prompt-prev jumps to the previous, currently not visible, prompt, and
prompt-next jumps to the next prompt that isn't at the top of the screen.
In other words, the implementation will be more or less stateless. The only thing we'll track is whether a row has a prompt or not. This shouldn't even increase the run-time memory usage, since the row struct is currently being padded.
Deleting a branch is permanent. It CANNOT be undone. Continue?