johnno1962 / GitDiff

Highlights deltas against git repo in Xcode
MIT License
891 stars 54 forks source link

Scrollbar colors with small file #57

Closed efc closed 5 years ago

efc commented 8 years ago

When I have a file that is too short to scroll at all, the scrollbar colors appear on the right even when no scrollbar is present and the mouse is not in the vicinity. In other words, the scrollbar colors are there all the time. They disappear as soon as I make the window small enough to require scrolling, then reappear when I make the window bigger.

johnno1962 commented 8 years ago

Bit of an edge case you got there. What do you propose I can do to resolve this?

efc commented 8 years ago

Actually, does not seem like an edge case at all. I see this effect on every new file I create until I type enough data into the file to exceed the size of the window.

My suggestion would be that if there is no scrollbar present and the mouse is not hovering at the right edge, then the scrollbar colors should not be drawn. But since that would be the usual behavior of the plugin (and indeed seems to work when files are longer), maybe the plugin could determine that the whole file is being displayed and hide the scrollbar colors entirely in that circumstance?