Fixed search result highlighting

This commit is contained in:
Moritz Lipp 2010-05-19 12:13:28 +02:00
parent eadca8d216
commit f0c0c7b8ee

View file

@ -1527,7 +1527,8 @@ sc_recolor(Argument* argument)
void void
sc_rotate(Argument* argument) sc_rotate(Argument* argument)
{ {
Zathura.PDF.rotate = (Zathura.PDF.rotate + 90) % 360; Zathura.PDF.rotate = (Zathura.PDF.rotate + 90) % 360;
Zathura.Search.draw = TRUE;
draw(Zathura.PDF.page_number); draw(Zathura.PDF.page_number);
} }
@ -3021,6 +3022,7 @@ bcmd_zoom(char* buffer, Argument* argument)
else else
Zathura.PDF.scale = 100; Zathura.PDF.scale = 100;
Zathura.Search.draw = TRUE;
draw(Zathura.PDF.page_number); draw(Zathura.PDF.page_number);
update_status(); update_status();
} }
@ -3109,6 +3111,7 @@ gboolean cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data)
GList* list; GList* list;
for(list = Zathura.Search.results; list && list->data; list = g_list_next(list)) for(list = Zathura.Search.results; list && list->data; list = g_list_next(list))
highlight_result(Zathura.Search.page, (PopplerRectangle*) list->data); highlight_result(Zathura.Search.page, (PopplerRectangle*) list->data);
Zathura.Search.draw = FALSE;
} }
cairo_set_source_surface(cairo, Zathura.PDF.surface, offset_x, offset_y); cairo_set_source_surface(cairo, Zathura.PDF.surface, offset_x, offset_y);