fish-shell/src
Johannes Altmanninger 04c9134275
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Limit command line rendering to $LINES lines
Render the command line buffer only until the last line we can fit
on the screen.

If the cursor pushes the viewport such that neither the prompt nor
the first line of the command line buffer are visible, then we are
"scrolled". In this case we need to make sure to erase any leftover
prompt, so add a hack to disable the "shared_prefix" optimization
that tries to minimize redraws.

Down-arrow scrolls down only when on the last line, and up-arrow always
scrolls up as much as possible.  This is somewhat unconventional;
probably we should change the up-arrow behavior but I guess it's a
good idea to show the prompt whenever possible.  In future we could
solve that in a different way: we could keep the prompt visible even
if we're scrolled. This would work well because at least the left
prompt lives in a different column from the command line buffer.
However this assumption breaks when the first line in the command
line buffer is soft-wrapped, so keep this approach for now.

Note that we're still broken when complete-and-search or history-pager
try to draw a pager on top of an overfull screen.  Will try to fix
this later.

Closes #7296
2024-10-25 17:35:42 +02:00
..
bin Restore terminal state again in panic handler 2024-10-12 13:28:55 +02:00
builtins Fix completion failing on unclosed brace with wildcard 2024-10-19 22:04:54 +02:00
env Import portable_atomic::AtomicU64 when std does not provide it 2024-08-11 14:50:39 +02:00
fork_exec Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
history Revert "Lock history file before reading it" 2024-10-14 11:13:46 +02:00
tests Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
universal_notifier Add kqueue-based uvar notifier for BSD (#10674) 2024-08-26 17:10:26 -05:00
widecharwidth Update widecharwidth for Unicode 16 2024-09-24 17:00:13 +02:00
wutil Stop using the getrandom feature of the rand crate 2024-10-13 12:39:54 -07:00
abbrs.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
ast.rs tokenizer: Stop copying the start string 2024-05-07 16:59:35 +02:00
autoload.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
color.rs Convert colors::Flags to a bitflags enum 2024-05-07 14:03:38 -05:00
common.rs Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
complete.rs Do not add a space after completing inside brace expansion 2024-10-19 22:06:05 +02:00
curses.rs Remove yet more dead code 2024-06-29 18:03:52 -07:00
editable_line.rs Remove some (hopefully) unnecessary clippy and compiler directives 2024-06-23 17:13:14 -07:00
env_dispatch.rs Revert "Resume repainting command line when colors change" 2024-08-25 18:41:31 -07:00
env_universal_common.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
event.rs Remove parser library_data_pod_t ffi workaround 2024-06-02 20:27:44 -05:00
exec.rs Also refresh TTY timestamps after external commands from bindings 2024-10-21 12:13:00 +02:00
expand.rs Do not add a space after completing inside brace expansion 2024-10-19 22:06:05 +02:00
fallback.rs Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
fd_monitor.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
fd_readable_set.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
fds.rs Fix typo 2024-10-09 12:36:58 +02:00
fish_test_helper.c fish_test_helper: Fix warnings about intentionally unused results 2024-08-31 13:16:51 -05:00
flog.rs Temporarily enable history_file debug category by default 2024-10-09 14:51:54 +02:00
function.rs Relax history autosuggestion and highlighting if cd is wrapped 2024-09-14 08:51:42 +02:00
future_feature_flags.rs Deprecate builtin test's one- and zero-argument modes (#10365) 2024-04-21 14:25:54 +02:00
future.rs Remove backports for 1.67 2024-04-29 22:00:59 +02:00
global_safety.rs Simplify shared-from-this pattern 2024-03-09 10:09:03 +01:00
highlight.rs Relax history autosuggestion and highlighting if cd is wrapped 2024-09-14 08:51:42 +02:00
history.rs Revert "Lock history file before reading it" 2024-10-14 11:13:46 +02:00
input_common.rs Fix number of characters consumed for VT200 mouse tracking 2024-10-24 11:22:52 -05:00
input.rs Commands to move by entire tokens 2024-10-05 22:43:39 +02:00
io.rs Clean up fd_monitor getter 2024-09-22 14:02:55 -07:00
job_group.rs Rename printf crate to fish-printf 2024-06-09 12:29:09 -07:00
key.rs fish_key_reader: stop emitting \n for ctrl-j 2024-09-23 20:08:46 +02:00
kill.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
lib.rs Clean up fish-printf in preparation for publishing 2024-09-21 17:52:11 -07:00
libc.c Revert libc time_t changes 2024-08-27 14:28:00 +02:00
libc.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
locale.rs Remove some (hopefully) unnecessary clippy and compiler directives 2024-06-23 17:13:14 -07:00
nix.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
null_terminated_array.rs Remove yet more dead code 2024-06-29 18:03:52 -07:00
operation_context.rs Make OperationContext not hold a Parser via Rc 2024-06-23 16:39:39 -07:00
output.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
pager.rs Also use control pictures for pager prefix 2024-10-19 22:05:49 +02:00
panic.rs Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
parse_constants.rs Rename printf crate to fish-printf 2024-06-09 12:29:09 -07:00
parse_execution.rs Fix completion failing on unclosed brace with wildcard 2024-10-19 22:04:54 +02:00
parse_tree.rs Use NonZero types for 1-based line numbers 2024-07-07 20:58:09 -05:00
parse_util.rs Fix completion failing on unclosed brace with wildcard 2024-10-19 22:04:54 +02:00
parser_keywords.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
parser.rs Also refresh TTY timestamps after external commands from bindings 2024-10-21 12:13:00 +02:00
path.rs Do not interpret unknown file systems as local on Linux 2024-10-09 14:48:58 +02:00
print_help.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
proc.rs Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
re.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
reader_history_search.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
reader.rs Also refresh TTY timestamps after external commands from bindings 2024-10-21 12:13:00 +02:00
redirection.rs Remove yet more dead code 2024-06-29 18:03:52 -07:00
screen.rs Limit command line rendering to $LINES lines 2024-10-25 17:35:42 +02:00
signal.rs Make SIGTERM handler async-signal-safe again 2024-10-21 09:30:47 +02:00
termsize.rs Remove yet more dead code 2024-06-29 18:03:52 -07:00
threads.rs Update threads::thread_id() documentation 2024-08-31 12:57:13 -05:00
timer.rs Revert libc time_t changes 2024-08-27 14:28:00 +02:00
tinyexpr.rs math: Nicer error for non-ascii-lowercase identifiers 2024-09-18 22:27:00 +02:00
tokenizer.rs Do not add a space after completing inside brace expansion 2024-10-19 22:06:05 +02:00
topic_monitor.rs Rename binary_semaphore_t to BinarySemaphore 2024-06-29 18:07:11 -07:00
trace.rs Remove parser library_data_pod_t ffi workaround 2024-06-02 20:27:44 -05:00
util.rs Stop using the getrandom feature of the rand crate 2024-10-13 12:39:54 -07:00
wait_handle.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
wchar_ext.rs Replace C++ doc \return with "Return" 2024-05-06 14:59:36 -05:00
wchar.rs Clean up fish-printf in preparation for publishing 2024-09-21 17:52:11 -07:00
wcstringutil.rs Remove wcstringutil::split_string() 2024-05-21 12:54:52 -05:00
wgetopt.rs Reimplement WGetopter::exchange() using rotate_left 2024-04-17 12:41:16 -07:00
wildcard.rs Do not add a space after completing inside brace expansion 2024-10-19 22:06:05 +02:00