Open Noneangel opened 9 months ago
Formatting a file with astyle was moving all diagnostics from my lsp to the bottom of the file when the option squeeze-line was on. It was also adding a new line at the bottom of the file every time when squeeze-line was off. Applying the suggested fix fixed both.
I'm running nvim 0.9.5 on windows 11 as well.
Neovim version (nvim -v)
v0.9.5
Operating system/version
windows 11
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Describe the bug
Range formatting isn't working with astyle on Windows. Instead, the entire file is formatted.
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
const int toto
lineExpected Behavior
Only the selection should have been formatted.
Minimal example file
Minimal init.lua
Additional context
In the log,
Output lines: { "#include <iostream>\r",
did you notice the\r
? It is not in the input line, so the minimal diff will detect the entire file as different. The additional\r
is due to this line https://github.com/stevearc/conform.nvim/blob/192a6d2ddace343f1840a8f72efe2315bd392243/lua/conform/runner.lua#L322 I think this is due to [jobstart](https://neovim.io/doc/user/builtin.html#jobstart()), on_stdout,in
readfile()
docBut I don't understand it as the two bold sentences seems contradictory.
In any case, replacing https://github.com/stevearc/conform.nvim/blob/192a6d2ddace343f1840a8f72efe2315bd392243/lua/conform/runner.lua#L330 with
Fix the bug.