diff --git a/shortcuts.c b/shortcuts.c index 33d5b64..706b497 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -18,6 +18,7 @@ #include "print.h" #include "page-widget.h" #include "adjustment.h" +#include #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) @@ -1404,6 +1405,10 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t* zathura_document_set_scale(zathura->document, zoom_max); } + const double new_zoom = zathura_document_get_scale(zathura->document); + if (fabs(new_zoom - old_zoom) <= DBL_EPSILON) + return false; + render_all(zathura); refresh_view(zathura);