Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When vim-gitgutter is configured to update on `BufEnter`, which is the default, we only need to update visible buffers on `FocusGained`. Other buffers will be updated as and when the user enters them.
- Loading branch information
2a5ae17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you iterating over all tabpages here? Shouldn't the current one be enough? If you switch to a different tabpage
BufEnter
will be called again.2a5ae17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. The same thing occurred to me after I made the change but I hadn't got around to doing anything about it.
Anyway, I've updated this in 93288af. A further improvement would be on
TabEnter
to skip the buffer that's about to be entered because that will be updated onBufEnter
– but I'll wait until the double-update for that buffer is an actual problem.