You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running :FormatCode on a cpp source (not header) file causes a trailing line filled with whitespaces to appear at the end of the document.
Running :FormatCode again and again removes and re-adds and removes and ... this line.
Open any .cc file (for example I use base/run_loop.cc from the chromium project
Run :FormatCode. Observe line with trailing whitespaces at the end of the file
Run :FormatCode. Observe line with trailing whitespaces at the end of the file is gone.
Repeat
My Setup
'vim-codefmt' is up-to-date (I ran :PlugUpdate)
─❯ nvim --version
NVIM v0.7.2
╰─❯ clang-format --version
clang-format version google3-trunk (30af2fb33ed2f610abfa50e53df9712887b2bd25)
Gif of the bug
Other things I tried
Manually running clang-format -i base/run_loop.cc from the command line does not introduce these whitespaces, which is why I opened the bug against vim-codefmt and not clang-format.
Please let me know if you need any more information.
Thanks!
The text was updated successfully, but these errors were encountered:
Can you confirm if clang-format is the actual formatter being used here? Tab complete after :FormatCode to see what formatters are installed and apply to .cc files, and check if running the one for clang-format has the same issue.
Description
Running
:FormatCode
on a cpp source (not header) file causes a trailing line filled with whitespaces to appear at the end of the document.Running
:FormatCode
again and again removes and re-adds and removes and ... this line.Steps to reproduce
Open any .cc file (for example I use
base/run_loop.cc
from the chromium projectRun
:FormatCode
. Observe line with trailing whitespaces at the end of the fileRun
:FormatCode
. Observe line with trailing whitespaces at the end of the file is gone.Repeat
My Setup
:PlugUpdate
)Gif of the bug
Other things I tried
clang-format -i base/run_loop.cc
from the command line does not introduce these whitespaces, which is why I opened the bug againstvim-codefmt
and notclang-format
.Please let me know if you need any more information.
Thanks!
The text was updated successfully, but these errors were encountered: