New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Output captured via 'verbosefile' has an additional empty line after each :echomsg (after 8.0.467) #1618

Closed
inkarkat opened this Issue Apr 6, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@inkarkat
Copy link

inkarkat commented Apr 6, 2017

My runVimTests testing framework captures output from a plugin-under-test via 'verbosefile' and then performs pattern matching on it. Since

patch 8.0.0467: using g< after :for does not show the right output
Problem:    Using g< after :for does not show the right output. (Marcin
            Szamotulski)
Solution:   Call msg_sb_eol() in :echomsg.

each message printed via :echomsg has an additional empty line in the captured file, and that breaks many of my tests. I think the captured output should accurately reflect what is actually printed inside Vim, and as there are no additional newlines visible inside Vim, neither should these appear in the capture. I hope you can fix the original problem in a different way that does not affect the captured output. (I would rather avoid adapting my tests; and there might be other uses for captures that rely on accurate information.)

Reproduce

Bad output (since 8.0.467):

$ rm src/log; src/vim -N -u NONE -c "set verbosefile=src/log" -c "echomsg 'foo' | echomsg 'bar'" -c "echomsg 'EOF'" -c "set verbosefile=" -c q; cat src/log


foo

bar

EOF$

Good (before 8.0.467):

$ rm src/log; src/vim -N -u NONE -c "set verbosefile=src/log" -c "echomsg 'foo' | echomsg 'bar'" -c "echomsg 'EOF'" -c "set verbosefile=" -c q; cat src/log

foo
bar
EOF$

@brammool brammool closed this in 52604f2 Apr 7, 2017

desvp added a commit to desvp/vim that referenced this issue May 30, 2017

patch 8.0.0547: extra line break in verbosefile
Problem:    Extra line break in verbosefile when using ":echomsg". (Ingo
            Karkat)
Solution:   Don't call msg_start(). (closes vim#1618)

janlazo added a commit to janlazo/neovim that referenced this issue Jun 18, 2018

vim-patch:8.0.0547: extra line break in verbosefile
Problem:    Extra line break in verbosefile when using ":echomsg". (Ingo
            Karkat)
Solution:   Don't call msg_start(). (closes vim/vim#1618)
vim/vim@52604f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment