mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Stop printing extra newline when Alt-W or Alt-L is used with a multiline prompt
When we want to print something while the prompt is still active, we move the cursor by printing a newline for each line in the prompt beyond the first one. As established by 80fe0a7fc (fish_job_summary: Format message better for multiline prompts, 2022-06-28), our use of "string repeat" actually prints an extra newline. Let's remove it here as well.
This commit is contained in:
parent
61b09ff4a7
commit
1527edd542
@ -15,7 +15,7 @@ function __fish_list_current_token -d "List contents of token under the cursor i
|
||||
end
|
||||
end
|
||||
|
||||
string repeat \n --count=(math (count (fish_prompt)) - 1)
|
||||
string repeat -N \n --count=(math (count (fish_prompt)) - 1)
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ function __fish_whatis_current_token -d "Show man page entries or function descr
|
||||
|
||||
printf "%s\n" $desc
|
||||
|
||||
string repeat \n --count=(math (count (fish_prompt)) - 1)
|
||||
string repeat -N \n --count=(math (count (fish_prompt)) - 1)
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user