Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/62cb644470f2c13d4ad0faa6f0ba25dcd9595322
>---------------------------------------------------------------
commit 62cb644470f2c13d4ad0faa6f0ba25dcd9595322
Author: johnd0e <
1838643...@users.noreply.github.com>
Date: Mon Sep 29 19:59:16 2025 +0200
Slightly better fix for Mantis #4084 (#1016)
>---------------------------------------------------------------
62cb644470f2c13d4ad0faa6f0ba25dcd9595322
extra/Addons/Macros/Panel.JumpToSelectedFile.lua | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/extra/Addons/Macros/Panel.JumpToSelectedFile.lua b/extra/Addons/Macros/Panel.JumpToSelectedFile.lua
index c87246e63..bcb7512d1 100644
--- a/extra/Addons/Macros/Panel.JumpToSelectedFile.lua
+++ b/extra/Addons/Macros/Panel.JumpToSelectedFile.lua
@@ -2,10 +2,8 @@ local cyclic = true -- set false to disable cyclic jump
local is_selected = 8
local function JumpToSelected (from, to)
- if from>0 and from<=APanel.ItemCount then
- for pos=from,to,from<to and 1 or -1 do
- if Panel.Item(0,pos,is_selected) then return Panel.SetPosIdx(0,pos) end
- end
+ for pos=from,to,to==1 and -1 or 1 do
+ if Panel.Item(0,pos,is_selected) then return Panel.SetPosIdx(0,pos) end
end
if cyclic then
mf.beep()