Skip to content

window-slot: Bookmark last visible item and fix view reload/switch scroll

Nautilus does not scroll correctly for forward or backward navigation, and does not remember the scrolled position after a reload or view type switch.

For navigation, this is because the behaviour of the action "list.scroll-to-item" does not put the specified position at the top of the view, but rather scrolls the minimum amount to bring it to view. For a reload with CTRL-R, new_content_view will be NULL which prevents us from scrolling to the current content_view's first visible item.

Save and scroll to the last visible item so all items are visible for back/forward and reload. Save and apply the relative adjustment factor when switching view types due to the different adjustment ranges.

Fixes #2720 (closed)

Edited by Gary Li

Merge request reports