Apologies for possibly a new thread, is there a way to reply to a post
without using a google account? I can't find anything about it online..
No, I decided that just determining whether to reload or not based on
the exit code was better as generally if it is non-zero, something
probably went wrong and it should be regenerated next time.
Those scripts are from when it also regenerated the preview on empty
output which also meant the previews for empty files got regenerated
every time as well.
My apologies, I'll update those now to match.
> I also remember you had worked out a solution to avoid extra ui draws
> for when movement commands do not change the current file (e.g. `down`
> command at the bottom of the list). Did you remove these? Are they
> redundant now?
I tried to make the current master as small of a change as possible as
that could be easily done in another PR and benefit lf either way; one I
was actually planning on submitting tonight (UTC+10:00).
> As for async preview options, first option seems like a dirty solution
> to me, especially if it changes the current background loading
> behavior. Second and third options sound more reasonable if I
> understood these correctly.
I wouldn't be happy with the first either but it might be the best for
working OOTB.
> So second option does not require anything on our side? If ueberzug is
> going to be the only option for true image previews, then we might
> still need an alternative for wayland:
>
>
https://github.com/gokcehan/lf/issues/437
No that wouldn't need any more code from us, the alternative for wayland
could just be an example script for kitty to order the previews properly
on the wiki (kitty is the only terminal I know which supports this).
I don't have one made up with both options but it wouldn't take long as
I could use mostly the same logic as in synchronous-previews. My only
concern is complicating the code more as you have mentioned in the past
that it isn't in the state you would like it to be.
Another option which I have thought about is having the server generate
previews ahead of time which the client then requests upon viewing the
file. However this would be quite a lot more work and complexity for not
a big gain outside of a sshfs and similar.
If we're discussing more preview related options would it make sense to
name them differently to show what they are for?
Such as:
- previews.enabled
- previews.previewer
- previews.cleaner
- previews.async
--
Thanks,
Jai