-
Notifications
You must be signed in to change notification settings - Fork 47
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
Lsp panics after deleting last line of a file #1094
Comments
@mrghosti3 Can you create a log file using |
Here is the log: |
@mrghosti3 Thanks for the log file! This looks oddly similar to neovim/neovim#27383. Input file: 0 \usepackage[unicode,colorlinks=false]{hyperref}
1 \usepackage[utf8x]{inputenc}
2 \usepackage[L7x]{fontenc}
...
102 }{\end{list}\end{mdframed}\par}
103 Change notification: {
"contentChanges": [
{
"range": {
"end": { "character": 0, "line": 104 },
"start": { "character": 0, "line": 103 }
},
"text": "",
"rangeLength": 1
}
],
"textDocument": {
"version": 8,
"uri": "file:///ddisk/uni/coding/ReportAndSlideTemplates/Examples/allPacks.tex"
}
}
The start position is located after last character of the document (the final newline), the end position on the line below it (but this does not exist). This seems wrong. In my opinion, it should be the last character of line 102 to the first character of line 103 instead so that the change deletes the last newline between line 102 and line 103 (there is no line 104 in this document). |
Indeed it does look like it could be an issue on the editor side. Though would be good to get someones feedback from a different editor, just in case. Perhaps this issue could remain open until there's an update on the one you mentioned? |
Environment
Description
To get this error, follow these steps:
This doesn't seem like a editor specific error, but could be wrong so more testing from others would be appreciated.
Backtrace:
More detailed backtrace in text file: trace.log
Did some minor investigation and the issue lies here:
texlab/crates/texlab/src/server.rs
Lines 384 to 387 in 8a66d05
Though from the backtrace, it is unclear where the problem comes into existence:
texlab/crates/texlab/src/util/line_index_ext.rs
Lines 26 to 30 in 8a66d05
The text was updated successfully, but these errors were encountered: