foot/doc
Daniel Eklöf bdb79e8b9f
osc: add support for OSC 133;A (prompt markers)
This patch adds support for the OSC-133;A sequence, introduced by
FinalTerm and implemented by iTerm2, Kitty and more. See
https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html.

The shell emits the OSC just before printing the prompt. This lets the
terminal know where, in the scrollback, there are prompts.

We implement this using a simple boolean in the row struct ("this row
has a prompt"). The prompt marker must be reflowed along with the text
on window resizes.

In an ideal world, erasing, or overwriting the cell where the OSC was
emitted, would remove the prompt mark. Since we don't store this
information in the cell struct, we can't do that. The best we can do
is reset it in erase_line(). This works well enough in the "normal"
screen, when used with a "normal" shell. It doesn't really work in
fullscreen apps, on the alt screen. But that doesn't matter since we
don't support jumping between prompts on the alt screen anyway.

To be able to jump between prompts, two new key bindings have been
added: prompt-prev and prompt-next, bound to ctrl+shift+z and
ctrl+shift+x respectively.

prompt-prev will jump to the previous, not currently visible, prompt,
by moving the viewport, ensuring the prompt is at the top of the
screen.

prompt-next jumps to the next prompt, visible or not. Again, by moving
the viewport to ensure the prompt is at the top of the screen. If
we're at the bottom of the scrollback, the viewport is instead moved
as far down as possible.

Closes #30
2022-06-16 19:02:10 +02:00
..
benchmark.md doc: benchmarks: update with desktop results for 1.12.1 (r9) 2022-05-12 13:10:24 +02:00
foot-ctlseqs.7.scd osc: add support for OSC 133;A (prompt markers) 2022-06-16 19:02:10 +02:00
foot.1.scd osc: add support for OSC 133;A (prompt markers) 2022-06-16 19:02:10 +02:00
foot.ini.5.scd osc: add support for OSC 133;A (prompt markers) 2022-06-16 19:02:10 +02:00
footclient.1.scd doc: document the new ‘environment’ config section 2022-06-13 11:55:23 +02:00
meson.build meson: stop using deprecated functions, require meson >= 0.58 2022-02-27 11:28:11 +01:00
sixel-wow.png README: add screenshot of sixel graphics 2020-02-22 22:04:28 +01:00