mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-03 20:11:15 -03:00
fish_clipboard_paste: Only trim leading whitespace on first line
We remove leading spaces so a paste isn't histignored, but we did so on all lines, which removed indentation. [ci skip]
This commit is contained in:
@@ -35,7 +35,7 @@ function fish_clipboard_paste
|
||||
if not string length -q -- (commandline -c)
|
||||
# If we're at the beginning of the first line, trim whitespace from the start,
|
||||
# so we don't trigger ignoring history.
|
||||
set data (string trim -l -- $data)
|
||||
set data[1] (string trim -l -- $data[1])
|
||||
end
|
||||
if test -n "$data"
|
||||
commandline -i -- $data
|
||||
|
||||
Reference in New Issue
Block a user