Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Error detected while processing CursorMoved Autocommands #19

Open
IndianBoy42 opened this issue Oct 8, 2021 · 3 comments
Open

Error detected while processing CursorMoved Autocommands #19

IndianBoy42 opened this issue Oct 8, 2021 · 3 comments

Comments

@IndianBoy42
Copy link

E5108: Error executing lua ...ode_action_menu/lsp_objects/edits/text_document_edit.lua:93: attempt to get length of local 'last_original_complete_line' (a nil value)

This happens while running :CodeActionMenu on a use statement in a rust file. rust-analyzer returns a 'Unmerge use' code_action.

Also if I hit to close the message bar, the popup still shows up (but with no diff)

@weilbith
Copy link
Owner

weilbith commented Oct 8, 2021

Okay, I fixed the issue you found here. Unfortunately this brings me to the next issue: rust-analyzer sometimes reports many edits for the same line. Unfortunately I don't handle this correctly and preview the same line multiple times with different diffs.
I need to rework my diff preview algorithm. In general it is not the best one. I don't think it makes sense to tweak this ugly beast here more and rather change it completely. Let me see. Do you have any suggestions for a better diff algorithm?

@IndianBoy42
Copy link
Author

I don't know much about different diff algorithms.

btw: I don't want to spam issues so maybe ill just report here that if you click off or otherwise make the cursor leave the virtual window then there doesn't seem to be a good way to go back and close the window. I think an autocmd on BufLeave or BufWinLeave that closes the window would be good

@weilbith
Copy link
Owner

weilbith commented Oct 8, 2021

I can push a change to fix the issue for you. So it becomes at least somewhat usable again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants