diff --git a/zathura/zathura.c b/zathura/zathura.c index 4077a1c..2979324 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1380,13 +1380,13 @@ position_set(zathura_t* zathura, double position_x, double position_y) } double comppos_x, comppos_y; - unsigned int page_id = zathura_document_get_current_page_number(zathura->document); + const unsigned int page_id = zathura_document_get_current_page_number(zathura->document); bool vertical_center = false; girara_setting_get(zathura->ui.session, "vertical-center", &vertical_center); /* xalign = 0.5: center horizontally (with the page, not the document) */ - if (vertical_center) { + if (vertical_center == true) { /* yalign = 0.0: align page an viewport edges at the top */ page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, &comppos_y); } else { @@ -1406,7 +1406,7 @@ position_set(zathura_t* zathura, double position_x, double position_y) /* center horizontally */ if (adjust_mode == ZATHURA_ADJUST_BESTFIT || adjust_mode == ZATHURA_ADJUST_WIDTH || - zoom_center) { + zoom_center == true) { position_x = 0.5; } }