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

Double sections #127

Open
seagle0128 opened this issue Apr 9, 2022 · 6 comments
Open

Double sections #127

seagle0128 opened this issue Apr 9, 2022 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@seagle0128
Copy link

While pressing g twice, two Todos sections are displayed in magit-status buffer as below.

image

@alphapapa
Copy link
Owner

What happens if you press g a third time?

@seagle0128
Copy link
Author

seagle0128 commented Apr 11, 2022

What happens if you press g a third time?

Only one TODOs section is displayed.

To be clear, I mean the issue appears while double pressing g quickly. Otherwise the behavior is normal. I think it may be related to the async operations?

@alphapapa
Copy link
Owner

Yes, there is nothing to stop the async process from being run multiple times at once and thereby inserting multiple sections. AFAIK it does no harm and would probably not be worth writing code to prevent this.

@seagle0128
Copy link
Author

seagle0128 commented Apr 11, 2022

I agree it does no harm, but I'd like suggest to check before inserting the TODO section if possible.

@alphapapa
Copy link
Owner

It could be done, but it's not a priority for me, because this falls into the "well, don't do that" category. :) Patches welcome.

@alphapapa alphapapa added bug Something isn't working help wanted Extra attention is needed labels Apr 13, 2022
@alphapapa
Copy link
Owner

See also: #145

@alphapapa alphapapa added this to the 1.8 milestone Aug 26, 2023
@alphapapa alphapapa self-assigned this Aug 26, 2023
@alphapapa alphapapa added the good first issue Good for newcomers label Aug 26, 2023
@alphapapa alphapapa modified the milestones: 1.8, v1.9 Sep 9, 2024
alphapapa pushed a commit to mpaulmier/magit-todos that referenced this issue Sep 27, 2024
This is to prevent the scan to be run multiple times and show more than once in
Magit's buffer

Fixes alphapapa#145 && alphapapa#127

Modified-by: Adam Porter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants