Reformat Code on a shell script changed nothing and format on save failed silently: bash-language-server answers formatting with an edit ending at Position.create(Number.MAX_VALUE, Number.MAX_VALUE), which arrives as the float 1.7976931348623157e+308, and reading it into lsp-types' u32 positions rejected the whole answer. The same refused a workspace/applyEdit and dropped a diagnostic with such a position.
The line and character of each position in a request's answer, an edit to apply and a diagnostic are now saturated to the u32 range before they are read (opaque data and arguments payloads are left untouched); the editor already clamps a position past the end of the text.
Co-authored-by: ntbang0901 <[email protected]>