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

UltestSummary broken after :bdelete buffer #109

Open
johnybx opened this issue Mar 17, 2022 · 2 comments
Open

UltestSummary broken after :bdelete buffer #109

johnybx opened this issue Mar 17, 2022 · 2 comments

Comments

@johnybx
Copy link

johnybx commented Mar 17, 2022

Describe the bug
When you delete any test buffer the ultest breaks. The reason for this is that the file is kept on multiple places for example in g:ultest_buffers, s:monitored here or in tracker.py but there is no cleanup on buffer delete so when buffer is deleted all parts of ultest still want to access buffer and variables set on buffer.

I wonder if it was worth to add some autocmd to cleanup the file name from these places if buffer is deleleted.

Logs - there is nothing related

To Reproduce
open any test file (or multiple), :bdelete test buffer, try to open UltestSummary and you get error:

Error detected while processing function ultest#summary#toggle[7]..ultest#summary#open[2]..<SNR>219_OpenNewWindow[36]..<SNR>219_RenderSummary[12]..<SNR>219_RenderGroup[3]..<SNR>219_RenderGroupMember:                                     
line    2:                                                                                                                                                                                                                                  
E121: Undefined variable: id                                                                                                                                                                                                                
E116: Invalid arguments for function get

Expected behavior
ultest would work and ignore / cleanup closed buffer.

rcarriga added a commit that referenced this issue Mar 19, 2022
@rcarriga
Copy link
Owner

Thanks for the report, should be working as expected now 😄

@johnybx
Copy link
Author

johnybx commented Mar 19, 2022

nice this works although I thought that we could also cleanup the cache in s:monitored and PositionTracker in the case when file is reopened 🙂 ( I don't do reopening closed buffer often so I am happy with current solution so this can be left as improvement )

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

No branches or pull requests

2 participants