Skip to content

Return \n to end of line in case it's deleted #245

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Jan 7, 2024

Conversation

Rutherther
Copy link
Contributor

Hello, it's been quite some time. I am reopening (creating a new one instead since it seems I don't have permission to reopen PRs here) #197.

One possible way to resolve #193.

lsp-mode in emacs sometimes tries to edit something past end of line if other conditions are met. Specifically, the template system coming with vhdl-mode seems to trigger this behavior. This removes \n from one of the lines, making rust_hdl contents and actual file contents different.

I have added a unit test to go past the end of line. It indeed fails without the lines I added, and works with them. I also found a bug in my code thanks to running the unit tests. The last line had \n added as well, although it shouldn't. I added a condition for that.

If you know of a better way to handle this, let me know, I could try to implement that instead. I am not very knowledgeable of rust_hdl codebase, so there might be some obvious oversights.

@kraigher kraigher merged commit 0bad292 into VHDL-LS:master Jan 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emacs strange Unexpected EOF
2 participants