-
Notifications
You must be signed in to change notification settings - Fork 54
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
Blank editor after formatting source code via LS #902
Comments
ghentschke
added a commit
to ghentschke/lsp4e-bachmann-fixes
that referenced
this issue
Jan 27, 2024
Splitting \r\n line endings leads to a BadLocationException while TextViewer.setRedraw is executed during a document.replace operation triggered by a TextEdit. fixes eclipse#902
ghentschke
added a commit
to ghentschke/lsp4e-bachmann-fixes
that referenced
this issue
Jan 28, 2024
Adds unit test to validate change. fixes eclipse#902
ghentschke
added a commit
to ghentschke/lsp4e-bachmann-fixes
that referenced
this issue
Jan 28, 2024
Add check in case that end line from edit is larger than the documents number of lines. fixes eclipse#902
mickaelistria
pushed a commit
that referenced
this issue
Jan 29, 2024
Splitting \r\n line endings leads to a BadLocationException while TextViewer.setRedraw is executed during a document.replace operation triggered by a TextEdit. fixes #902
mickaelistria
pushed a commit
that referenced
this issue
Jan 29, 2024
Adds unit test to validate change. fixes #902
mickaelistria
pushed a commit
that referenced
this issue
Jan 29, 2024
Add check in case that end line from edit is larger than the documents number of lines. fixes #902
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: