dsanson / termpdf.py

A graphical pdf and epub reader that works inside the kitty terminal
MIT License
496 stars 30 forks source link

Refresh causes certain characters to not render properly #10

Closed camspiers closed 4 years ago

camspiers commented 4 years ago

When you hit ctrl+r, some new content that is added to the underlying pdf doesn't get rendered.

In the following screenshot, you should be able to see how the T in "This" is missing.

Screen Shot 2020-04-16 at 8 25 21 PM
camspiers commented 4 years ago

@dsanson You might appreciate the integration between Vimtex, Kitty and Termpdf.py here:

https://www.reddit.com/r/vim/comments/g2dfkt/back_with_more_vimtex_content_this_time_with_pdf/

Integration details here:

https://github.com/camspiers/dotfiles/blob/master/files/.config/kitty/termpdf.py

And here:

https://github.com/camspiers/dotfiles/blob/42316d7d1c14314e9851e1c92349ddb5662dc1b3/files/.config/nvim/init.vim#L608-L629

But note that in termpdf.py, the kitten that I am using to manage the opening and closing of termpdf.py I need to avoid using the "ctrl+r" approach for refreshing, because of the reported bug here:

https://github.com/camspiers/dotfiles/blob/42316d7d1c14314e9851e1c92349ddb5662dc1b3/files/.config/kitty/termpdf.py#L17-L21

dsanson commented 4 years ago

Neat! And that's a weird bug. Reload shows some, but not all, of the newly added text?

camspiers commented 4 years ago

That is right, some but not all, it's quite strange. I did also notice that if your PDF grows in size, say from 1 page to 2, the count of the pages in the lower right isn't updated. Don't recall however whether you can access the second page.

camspiers commented 4 years ago

Basic fix is here #11

dsanson commented 4 years ago

The pull request has been merged. Does this fix the problem for everyone?

camspiers commented 4 years ago

It is fixed for me, thanks!