This commit fixes attempt to set invalid zoom value when opening document for the first time with adjust-open width
option.
In this case function zathura_document_get_document_size
returns document_width == 0
. This leads to division to NaN
at this line: https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/zathura.c#L1699 and further attempt to set INFINITY
zoom value at this line: https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/zathura.c#L1707.
Steps to reproduce:
- Set
set adjust-open width
in the configuration file - Clean zathura history:
mv ~/.local/share/zathura/history{,.bak}
- Open an arbitrary document.
With pdf-poppler backend, you'll get an empty window and endless warnings in the terminal:
With muPdf backend, the zathura will not be open at all: