The following function does not echo the result variable.
fu! Test() let input = input(">") let result = "error\n" if 1 echo result endif endf
Removing the newline from result, removing the input, or removing the if statement will fix this issue. Any ideas why this happens?
In my actual function the result variable is set from executing a system command and I would prefer not parsing/correcting the result before echoing it.