fish-shell/doc_src
Johannes Altmanninger 83b0294fc9 ctrl-l to scroll content instead of erasing screen
On ctrl-l we send `\e[2J` (Erase in Display).  Some terminals interpret
this to scroll the screen content instead of clearing it. This happens
on VTE-based terminals like gnome-terminal for example.

The traditional behavior of ctrl-l erasing the screen (but not the
rest of the scrollback) is weird because:

1. `ctrl-l` is the easiest and most portable way to push the prompt
   to the top (and repaint after glitches I guess). But it's also a
   destructive action, truncating scrollback. I use it for scrolling
   and am frequently surprised when my scroll back is missing
   information.
2. the amount of lines erased depends on the window size.
   It would be more intuitive to erase by prompts, or erase the text
   in the terminal selection.

Let's use scrolling behavior on all terminals.

The new command could also be named "push-to-scrollback", for
consistency with others. But if we anticipate a want to add other
scrollback-related commands, "scrollback-push" is better.

This causes tests/checks/tmux-history-search.fish to fail; that test
seems pretty broken; M-d (alt-d) is supposed to delete the current
search match but there is a rogue "echo" that is supposed to invalidate
the search match.  I'm not sure how that ever worked.

Also, pexepect doesn't seem to support cursor position reporting,
so work around that.

Ref: https://codeberg.org/dnkl/foot/wiki#how-do-i-make-ctrl-l-scroll-the-content-instead-of-erasing-it
as of wiki commit b57489e298f95d037fdf34da00ea60a5e8eafd6d

Closes #10934
2024-12-30 10:50:38 +01:00
..
cmds ctrl-l to scroll content instead of erasing screen 2024-12-30 10:50:38 +01:00
python_docs_theme docs: Distinguish documents in sidebar 2024-12-28 08:42:46 +01:00
commands.rst docs: add short documentation for export 2024-11-06 23:47:31 +08:00
completions.rst docs: Some rewording on completions 2024-05-10 17:40:18 +02:00
conf.py docs: Read version from the version file 2024-12-06 22:12:26 +01:00
contributing.rst Improve CONTRIBUTING and add it to the docs 2023-06-01 18:09:02 +02:00
design.rst docs: Fix typos 2022-09-17 21:31:06 +08:00
faq.rst docs/faq: Fix some broken keys 2024-11-21 18:28:43 +01:00
fish_for_bash_users.rst fish_for_bash_users: Put explanation on subshells first 2024-05-15 22:44:07 +02:00
fish_indent_lexer.py docs: restore default highlighting keywords and options in HTML 2022-01-16 14:07:19 +01:00
fish_synopsis.py Document the ! (not) and . (source) aliases more 2024-04-20 13:34:08 +02:00
index.rst docs: Some slight rewordings 2023-08-23 23:08:56 +02:00
interactive.rst Remove stale docs about fish_vi_force_cursor 2024-10-21 21:53:32 +02:00
language.rst doc: expand &| reference to full example (#10885) 2024-12-04 20:13:00 +01:00
license.rst docs: Remove broken indents in license 2024-08-15 17:48:48 +02:00
prompt.rst docs/prompt: Add funcsave/funced 2024-09-15 09:39:13 +02:00
relnotes.rst docs: call the CHANGELOG "release notes" 2021-02-25 22:46:24 +08:00
tutorial.rst docs: Fix two links 2024-06-22 14:58:07 +02:00