xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

Scroll bars disappearing when switching from different application #476

Closed scholtzan closed 5 years ago

scholtzan commented 5 years ago

When switching to xi from another application the scroll bars don't appear when scrolling:

out

Once the editor window is resized or some text is inserted the scroll bars will reappear when scrolling.

nangtrongvuon commented 5 years ago

This is directly caused by a fix I merged a few weeks prior. Why this happens is the ScrollView looks for the scroll method to show the scroller. I have however overriden this scroll method to instead set the bounds origin directly.

I'm not sure what triggers the appearance of the scrollers in scroll, but this bug would be fixed if I am able to replicate that.

cmyr commented 5 years ago

@nangtrongvuon can you call super in your implementation of scroll? I'd check the docs and see what they say about this, but it could be the problem.

nangtrongvuon commented 5 years ago

Actually, I’ve been doing that and the problem is a little bit trickier. Simply calling super will make the scroll bar very jerky. There’s a hacky fix that I came up with (which is to call setBoundsOrigin twice) but I suspect the real fix may be to get xi-mac to render continuously properly on scrolls, but I’m not quite sure how to do that yet.