mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 11:46:01 +01:00
Logical error fix and cleanup for zathura_jumplist_reset_current
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
3cf8fba779
commit
486698d9fb
1 changed files with 3 additions and 7 deletions
10
zathura.c
10
zathura.c
|
@ -1220,18 +1220,14 @@ zathura_jumplist_backward(zathura_t* zathura)
|
|||
static void
|
||||
zathura_jumplist_reset_current(zathura_t* zathura)
|
||||
{
|
||||
g_return_if_fail(zathura != NULL || zathura->jumplist.cur != NULL);
|
||||
|
||||
if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) {
|
||||
return;
|
||||
}
|
||||
g_return_if_fail(zathura != NULL && zathura->jumplist.cur != NULL);
|
||||
|
||||
while (true) {
|
||||
girara_list_iterator_next(zathura->jumplist.cur);
|
||||
|
||||
if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
girara_list_iterator_next(zathura->jumplist.cur);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue