mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 22:13:48 +01:00
Activate incremental search
This commit reactivates the incremental search and defines that special commands that are set get called all the time an input occurs are not evaluated in the activate section.
This commit is contained in:
parent
cc3bb4d494
commit
f28700ea46
@ -136,8 +136,8 @@ BufferCommand buffer_commands[] = {
|
||||
/* special commands */
|
||||
SpecialCommand special_commands[] = {
|
||||
/* identifier, function, a, argument */
|
||||
{'/', scmd_search, 0, { DOWN } },
|
||||
{'?', scmd_search, 0, { UP } },
|
||||
{'/', scmd_search, 1, { DOWN } },
|
||||
{'?', scmd_search, 1, { UP } },
|
||||
};
|
||||
|
||||
/* settings */
|
||||
|
13
zathura.c
13
zathura.c
@ -2818,6 +2818,11 @@ cb_index_selection_changed(GtkTreeSelection* treeselection, GtkWidget* action_vi
|
||||
gboolean
|
||||
cb_inputbar_kb_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
{
|
||||
/* when the return button is pressed the inputbar is activated,
|
||||
* so we do not handle it here */
|
||||
if(event->keyval == GDK_Return)
|
||||
return FALSE;
|
||||
|
||||
int i;
|
||||
|
||||
/* inputbar shortcuts */
|
||||
@ -2875,6 +2880,14 @@ cb_inputbar_activate(GtkEntry* entry, gpointer data)
|
||||
{
|
||||
if(identifier == special_commands[i].identifier)
|
||||
{
|
||||
/* special commands that are evaluated every key change are not
|
||||
* called here */
|
||||
if(special_commands[i].always == 1)
|
||||
{
|
||||
isc_abort(NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
retv = special_commands[i].function(input, &(special_commands[i].argument));
|
||||
if(retv) isc_abort(NULL);
|
||||
gtk_widget_grab_focus(GTK_WIDGET(Zathura.UI.view));
|
||||
|
Loading…
Reference in New Issue
Block a user