mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-27 16:54:39 +01:00
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 <sebastian+dev@ramacher.at>
This commit is contained in:
parent
b5237680f2
commit
c5e593d3c5
1 changed files with 11 additions and 0 deletions
11
zathura.c
11
zathura.c
|
@ -1188,6 +1188,17 @@ zathura_jumplist_hide_inputbar(zathura_t* zathura)
|
||||||
girara_isc_completion(zathura->ui.session, &arg, NULL, 0);
|
girara_isc_completion(zathura->ui.session, &arg, NULL, 0);
|
||||||
|
|
||||||
if (zathura->ui.session->global.autohide_inputbar == true) {
|
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);
|
gtk_widget_hide(zathura->ui.session->gtk.inputbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue