joshuto icon indicating copy to clipboard operation
joshuto copied to clipboard

[bug] preview_width is `0` in `preview.sh`, unexpected

Open alexzanderr opened this issue 3 years ago • 2 comments

Hello. Im trying to make the preview work well, by using this method:

        rs|md|toml)
            echo "hello: ${PREVIEW_WIDTH}"
            bat "${FILE_PATH}" \
                --terminal-width="${PREVIEW_WIDTH}" \
                --wrap=auto \
                --color=always \
                --pager=never \
                --style=plain \
                --number \
                && exit 5
            ;;

But when I'm running the joshuto bin and trying to preview a readme for example: image the preview_width is zero, not good.

But there is another problem, sometimes the above issue happens, sometimes doesnt happen and preview_width is ok and then I can preview: image

What is happening?

alexzanderr avatar Jul 23 '22 11:07 alexzanderr

Apologies that I never got around to this, are you still able to reproduce this?

kamiyaa avatar Sep 09 '22 15:09 kamiyaa

Should be fixed with 1908ff94b7e5f981a4254ca697056a299b2e6b51

Let me know if its fixed!

kamiyaa avatar Sep 11 '22 01:09 kamiyaa

hello. sorry for a long time no response!

i can confirm that now its working fine, in the latest commit: 269cf09

EDIT: im pretty sure it was fixed in https://github.com/kamiyaa/joshuto/commit/1908ff94b7e5f981a4254ca697056a299b2e6b51, but today(07.01.2023) i was testing out joshuto from github master from 269cf09.

thanks for the response and for the bug fix!

alexzanderr avatar Jan 07 '23 15:01 alexzanderr