When formatting a source code file in the editor, the editor can become blank caused by a BadLocationException during TextViewer.setRedraw. See this cdt-lsp issue for further details
After some investigation I found out that it will be triggered, when the TextEdit response on a textDocument/formatting request leads to a splitting of the \r\n line ending. See this comment.
This could be fixed in org.eclipse.lsp4e.LSPEclipseUtils.applyEdits(IDocument, List<? extends TextEdit>). I can provide a PR for that.
When formatting a source code file in the editor, the editor can become blank caused by a
BadLocationException
duringTextViewer.setRedraw
. See this cdt-lsp issue for further detailsAfter some investigation I found out that it will be triggered, when the
TextEdit
response on atextDocument/formatting
request leads to a splitting of the\r\n
line ending. See this comment.This could be fixed in
org.eclipse.lsp4e.LSPEclipseUtils.applyEdits(IDocument, List<? extends TextEdit>)
. I can provide a PR for that.