Closed Davejkane closed 5 years ago
If len < 10 move by one image, if 10 < len < 20 move by 2 images etc
Would cutting it off at 10% be fine? 1 step: <= 10
2 step: 10 < len <= 20
What did you want for the multiples of 10 if that is not the case?
What should be the default behavior if there is not 10% left to skip?
Should the viewer take the user to the last/first image?
Or, should it wrap around?
I mean I'm open to suggestions on this one, but I was basically thinking 10% of length, rounding up. I worded it pretty poorly I can see.
As for what to do when there is less than 10% left, we should go to the last image. I don't think there should ever be wrapping around. If you want to go back to the first image, it's just a keystroke away (g
). Thanks for taking that into consideration, I hadn't thought of that.
SkipForward
andSkipBack
to Action Enum inui.rs
event_action
function inui.rs
mapw
andPageUp
to SkipForwardevent_action
function inui.rs
mapb
andPageDown
to SkipBackrun
inprogram.rs
match SkipForward to skip_forward functionrun
inprogram.rs
match SkipBack to skip_back functionskip_forward
andskip_backward
functions, move by 10% of len of imagesincrement
ordecrement
with the skip length.