Commit c5e593d3 authored by Marawan Tanager's avatar Marawan Tanager Committed by Sebastian Ramacher

Don't hide the inputbar in case of incremental search

Hiding the inputbar immediately before jumping breaks incremental search, as
Guillaume Duranceau stated in an earlier mail.

This patch makes an exception for the case of incremental search, at the cost
of a slight displacement when jumping back (^o) after ending the incremental
search (pressing the ESC key). The rest of the jump cases are unaffected.

This should makes things usable for now, until we move to GTK3 (link to it by
default) which has a new widget that suits this problem nicely (GtkOverlay), as
demonstrated by an earlier patch by Abdo Roig-Maranges which is now included on
the develop branch in girara repo as commit
70fd1cf354ee1300d4a9bdab9e939d5cc975979e, but is compiled only with GTK3.
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent b5237680
......@@ -1188,6 +1188,17 @@ zathura_jumplist_hide_inputbar(zathura_t* zathura)
girara_isc_completion(zathura->ui.session, &arg, NULL, 0);
if (zathura->ui.session->global.autohide_inputbar == true) {
char *input = gtk_editable_get_chars(GTK_EDITABLE(zathura->ui.session->gtk.inputbar_entry), 0, -1);
bool res = false;
girara_setting_get(zathura->ui.session, "incremental-search", &res);
if ((*input == '/' || *input == '?') && res == true) {
g_free(input);
return;
}
gtk_widget_hide(zathura->ui.session->gtk.inputbar);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment