diff --git a/callbacks.c b/callbacks.c index f5ad9dc..9a5f816 100644 --- a/callbacks.c +++ b/callbacks.c @@ -92,6 +92,11 @@ cb_view_hadjustment_value_changed(GtkAdjustment* adjustment, gpointer data) return; } + /* Do nothing in index mode */ + if (girara_mode_get(zathura->ui.session) == zathura->modes.index) { + return; + } + update_visible_pages(zathura); double position_x = zathura_adjustment_get_ratio(adjustment); @@ -113,6 +118,11 @@ cb_view_vadjustment_value_changed(GtkAdjustment* adjustment, gpointer data) return; } + /* Do nothing in index mode */ + if (girara_mode_get(zathura->ui.session) == zathura->modes.index) { + return; + } + update_visible_pages(zathura); double position_x = zathura_document_get_position_x(zathura->document); @@ -135,6 +145,11 @@ cb_view_hadjustment_changed(GtkAdjustment* adjustment, gpointer data) zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); + /* Do nothing in index mode */ + if (girara_mode_get(zathura->ui.session) == zathura->modes.index) { + return; + } + /* Don't scroll we're focusing the inputbar. */ if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) { return; @@ -158,6 +173,11 @@ cb_view_vadjustment_changed(GtkAdjustment* adjustment, gpointer data) zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); + /* Do nothing in index mode */ + if (girara_mode_get(zathura->ui.session) == zathura->modes.index) { + return; + } + /* Don't scroll we're focusing the inputbar. */ if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) { return;