oni icon indicating copy to clipboard operation
oni copied to clipboard

Scrolling with j/k in Explorer causes flicker

Open Speculative opened this issue 8 years ago • 7 comments

Oni Version: 0.3.4 Neovim Version (Linux only): Operating System: Windows

Describe your issue

Flicker in Explorer In the gif above I'm only pressing j/k.

Explorer pane is "flickering" when you try to scroll with j/k past the bottom of a list that's taller than the pane itself. When the cursor reaches the bottom of the pane, pressing j to focus the next item (which is not currently visible as it's below the bottom of the pane) causes the whole pane to jump up to the top before jumping back down to the next item in the list. It always does this unless you're in the first pane height of the list.

Expected behaviour

Each time I press j, the list should scroll down by one element and keep the cursor at the bottom of the pane.

Actual behaviour

The whole view flashes up to the top of the list before jumping back down to the next item in the list, vertically centering the cursor in the pane. It continues to do this for each press.

Steps to reproduce

  1. Have enough items in Explorer that the list is taller than the pane
  2. Focus the Explorer
  3. Scroll past the bottom using j

Speculative avatar Jun 13 '18 17:06 Speculative

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Jun 13 '18 17:06 oni-bot

Side note: happy to pick this up and see if I can fix it this weekend. It's interfering with my bad habit of mindlessly scrolling up and down my source tree when I don't know what to do :)

Speculative avatar Jun 13 '18 17:06 Speculative

@Speculative thanks for raising an issue to track this, I actually noted the same issue and opened #2182 to solve it so it smooths out scrolling hopefully it can be merged in soon

akinsho avatar Jun 13 '18 17:06 akinsho

Oops, I'd totally forgotten about that PR when I asked them to raise an issue. Since it looks like its just waiting on a review, I'll review it later today @Akin909.

CrossR avatar Jun 13 '18 17:06 CrossR

@CrossR no worries would be good to have someone try it the scrolling part was pretty straight forward although how the entire component is rendered is kind of different so lemme know if there are weird quirks you notice (been running it locally and seems fine)

akinsho avatar Jun 13 '18 18:06 akinsho

@Akin909 Does https://github.com/onivim/oni/pull/2182 fix this?

badosu avatar Sep 03 '18 16:09 badosu

@badosu it does think this can be closed out now 👍

akinsho avatar Sep 03 '18 22:09 akinsho