From bd1f8311dd68b8e784dac35dc2c949da61a0f0ae Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire Date: Sun, 29 Dec 2024 23:42:25 -0300 Subject: [PATCH] dont scroll down metadata when list is empty --- src/internal/handle_panel_movement.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/internal/handle_panel_movement.go b/src/internal/handle_panel_movement.go index a2e35e25..b539840c 100644 --- a/src/internal/handle_panel_movement.go +++ b/src/internal/handle_panel_movement.go @@ -544,6 +544,10 @@ func (m *model) controlMetadataListUp(wheel bool) { runTime = wheelRunTime } + if len(m.fileMetaData.metaData) == 0 { + return + } + for i := 0; i < runTime; i++ { if m.fileMetaData.renderIndex > 0 { m.fileMetaData.renderIndex--