correct left/right directions

This commit is contained in:
2025-05-10 22:46:04 -04:00
parent c7a5041c4c
commit 7956c84a94

View File

@@ -219,12 +219,12 @@ func keyPress(e *tk.Event) {
} else { } else {
destroyFileList(true) destroyFileList(true)
} }
case "Up", "Right": case "Up", "Left":
if curr > 0 { if curr > 0 {
updateImage(filepath.Join(directoryState.currentDirectory, directoryState.images[curr-1])) updateImage(filepath.Join(directoryState.currentDirectory, directoryState.images[curr-1]))
moveSelectInFileList(curr - 1) moveSelectInFileList(curr - 1)
} }
case "Down", "Left": case "Down", "Right":
if curr < len(directoryState.images)-1 && curr != -1 { if curr < len(directoryState.images)-1 && curr != -1 {
updateImage(filepath.Join(directoryState.currentDirectory, directoryState.images[curr+1])) updateImage(filepath.Join(directoryState.currentDirectory, directoryState.images[curr+1]))
moveSelectInFileList(curr + 1) moveSelectInFileList(curr + 1)