If I have the following binding:
r = exec magick "${imv_current_file}" -rotate 90 "${imv_current_file}"
and use it on a large file *or* I have reduced repeat_delay (e.g.
repeat_delay 300) then magick will be spawned again after it has
terminated. I don't know if it will ever stop doing so.
This sounds related to for instance:
https://github.com/eXeC64/imv/issues/201
Filesize and repeat_delay seem to have an influence.
That does sound similar to the previous issue. Are you using wayland or
x11? Presumably it's an issue with auto-repeat triggering that binding
multiple times. Either there's an issue with the input handling logic,
or it's unavoidable in which case perhaps imv should ignore key repeat
events after some threshold since the previous one.
On 20.12.21 20:52, Harry Jeffery wrote:
> Are you using wayland or x11?
Wayland with sway.
> Presumably it's an issue with auto-repeat triggering that binding > multiple times. Either there's an issue with the input handling logic, > or it's unavoidable in which case perhaps imv should ignore key repeat > events after some threshold since the previous one.
Are you able to reproduce the issue on your side? I can hit the problem
reliably with
r = exec sleep 1
If I set it low enough (sleep 0.2 with repeat_delay 300) I can trigger
it by holding the key slightly longer.
Therefore it looks like how long I hold the key + the time the command
takes to finish, is added and if it's longer than repeat_delay it
respawns the command endlessly.
Though I currently have no idea why it keeps respawning whereas it does
not when holding the key for 'next 1'.
While experimenting with the sleep duration I found something else.
Tested with standard repeat_delay 600 and without trying to trigger
endless spawning. Two test cases:
r = exec sleep 0.2; next 1
r = exec sleep 0.58; next 1
Start imv with at least 3 images to notice the effect.
* With sleep 0.2 it waits for sleep and then goes to the next image.
* With sleep 0.58 it waits for sleep, changes to the next image, and
then immediately changes to the next image again.
Curious why it wouldn't do a second sleep.