Skip to content
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

Not removing Biscuits when deleting a line #45

Closed
davvil opened this issue Apr 5, 2023 · 4 comments · Fixed by #51
Closed

Not removing Biscuits when deleting a line #45

davvil opened this issue Apr 5, 2023 · 4 comments · Fixed by #51

Comments

@davvil
Copy link

davvil commented Apr 5, 2023

When I delete a line (e.g. with dd) , the biscuit associated with the line stays, without any way to remove it (AFAICT).

I'm using the cusor_line_only option, in case this is relevant.

@cmgriffing
Copy link
Contributor

Interesting. Thanks for reporting this. I will have to look into it.

Have you tried without cursor_line_only as well? No worries if not, just curious.

@davvil
Copy link
Author

davvil commented Apr 12, 2023

Just tried it. Same thing happens without cursor_line_only.

@davvil
Copy link
Author

davvil commented Apr 20, 2023

FWIW, adding a call to nvim_buf_clear_namespace before the while has_nodes loop in init.lua solves the problem for the case when cusor_line_only is set. However it introduces additional issues in case it is not set, moving the biscuit to an incorrect line.

@cmgriffing
Copy link
Contributor

FWIW, adding a call to nvim_buf_clear_namespace before the while has_nodes loop in init.lua solves the problem for the case when cusor_line_only is set. However it introduces additional issues in case it is not set, moving the biscuit to an incorrect line.

That is a great fix. I'm not sure that is a new bug with the biscuit being on the wrong line. It is likely just a failure of the tree-sitter parser because the code no longer actually validates in the cases I have seen.

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

Successfully merging a pull request may close this issue.

2 participants