Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
21856c00
Commit
21856c00
authored
Feb 25, 2012
by
Moritz Lipp
Browse files
Iterate through all search results correctly
parent
f659be99
Changes
1
Hide whitespace changes
Inline
Side-by-side
shortcuts.c
View file @
21856c00
...
...
@@ -511,7 +511,7 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
target_page
=
page
;
target_idx
=
current
+
1
;
// g_object_set(page->drawing_area, "search-current", current + 1, NULL);
}
else
if
(
diff
==
-
1
&&
current
>
=
1
)
{
}
else
if
(
diff
==
-
1
&&
current
>
0
)
{
// g_object_set(page->drawing_area, "search-current", current - 1, NULL);
target_page
=
page
;
target_idx
=
current
-
1
;
...
...
@@ -522,6 +522,7 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
for
(
int
npage_id
=
1
;
page_id
<
num_pages
;
++
npage_id
)
{
int
ntmp
=
cur_page
+
diff
*
(
page_id
+
npage_id
);
zathura_page_t
*
npage
=
zathura
->
document
->
pages
[(
ntmp
+
2
*
num_pages
)
%
num_pages
];
zathura
->
document
->
current_page_number
=
npage
->
number
;
g_object_get
(
npage
->
drawing_area
,
"search-length"
,
&
num_search_results
,
NULL
);
if
(
num_search_results
!=
0
)
{
target_page
=
npage
;
...
...
@@ -530,6 +531,7 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
}
}
}
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment