You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: #184
This plugin optimizes performance for large files by only attempting to
render what is visible in the window + some amount of buffer. This is
likely what users want in most instances however does not account for
the fact that the same file can be open in multiple windows at the same
time. When this occurs and one of the windows is scrolled the other
window will start losing decorations.
To account for this we now iterate through all windows for the current buffer
and collect all visible ranges. These ranges are coalesced based on any
overlaps. This is done in a new `range` module.
Much of the logic in the `context` module needed to be updated to
account for multiple ranges rather than a single top and bottom. This
was fairly easy for most things and involved adding a loop over the ranges.
It was convenient that all the range checking logic was centralized in
the `context` module and did not leak into any of the rendering logic,
so it seems like we have a good abstraction.
Since we went the more complicated route with the implementation
handling multiple ranges the performance impact should be negligible. It
should be none with a single window and as little as possible with
multiple windows since no matter what we will need to do more work to
render more lines.
0 commit comments