thimc / lfimg

Image preview support for lf (list files) using Überzug
GNU General Public License v3.0
259 stars 46 forks source link

Fixed the bug where an image that already have been displayed can't be displayed again without reloading #4

Closed x41lakazam closed 4 years ago

x41lakazam commented 4 years ago

I just used the 'lf -remote' command to reload it automatically. I added a protection so it doesn't reload the same file thousands times.

Cyberdr3am commented 4 years ago

Thx for your help but when you use it on lf the terminal blink a lot and you can't use it ( reload again and again )

x41lakazam commented 4 years ago

Hi, It's weird,

    if [ $2 -ne `cat $LAST_PIC_FILE` ] ; then
        echo $2 > $LAST_PIC_FILE
        lf -remote "send reload"
    fi

This block is supposed to store the name of the picture so it doesn't reload it twice, let me check.

x41lakazam commented 4 years ago

Here you are. The workaround was actually much simpler than that, It blinked because I put it outside of the "draw" case. Sorry.

Cyberdr3am commented 4 years ago

Thx a lot for your help but with your last modification the terminal keep blink but only when i display image. CPU 100% but this don't work sorry

When lf restart he "draw" again so he restart and he drow again and again and again

thimc commented 4 years ago

Seems that your pull request isn't solving the problem, so unfortunately I will have to close this pull request.