(already fixed by 41d6a5b, issue for documentation)
If the prompt looks like
function fish_prompt
echo prompt # prints a newline
echo # this prints an additional newline that is trimmed
end
we only trim the last newline, so the commandline would start on an empty line. This is, as intended.
What isn't as intended is that fish neglects to reset the cursor position to 0 after that newline, so entering e.g. echo foo looks like
(i.e. the echo foo starts after the column prompt would end on!)
This is because we neglected to set the last_line_width if the last_line was empty, which I've now fixed.