Skip to content

fix: multiple au attached to one buf#117

Merged
xiaoshihou514 merged 2 commits intonvimdev:mainfrom
xiaoshihou514:fix_dup_au
Oct 21, 2023
Merged

fix: multiple au attached to one buf#117
xiaoshihou514 merged 2 commits intonvimdev:mainfrom
xiaoshihou514:fix_dup_au

Conversation

@xiaoshihou514
Copy link
Copy Markdown
Member

Occasionally there may be two aus for one buffer, not entirely sure how this happened but this fixes it at its core

@xiaoshihou514 xiaoshihou514 changed the title Fix dup au fix: multiple au attached to one buf Oct 21, 2023
@xiaoshihou514 xiaoshihou514 merged commit 01bc09f into nvimdev:main Oct 21, 2023
@xiaoshihou514 xiaoshihou514 deleted the fix_dup_au branch October 21, 2023 18:14
Comment thread lua/guard/format.lua
if not vim.bo[buf].modified then
return
end
require('guard.format').do_fmt(opt.buf)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't remove there. otherwise it's a closure.

Copy link
Copy Markdown
Member Author

@xiaoshihou514 xiaoshihou514 Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? 😕

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callback it's a function you used buff number outside it then it's a closure when this callback run it will use this variable . buffer not same :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

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 this pull request may close these issues.

2 participants