mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 07:16: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
|
static void
|
||||||
zathura_jumplist_reset_current(zathura_t* zathura)
|
zathura_jumplist_reset_current(zathura_t* zathura)
|
||||||
{
|
{
|
||||||
g_return_if_fail(zathura != NULL || zathura->jumplist.cur != NULL);
|
g_return_if_fail(zathura != NULL && zathura->jumplist.cur != NULL);
|
||||||
|
|
||||||
if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
girara_list_iterator_next(zathura->jumplist.cur);
|
|
||||||
|
|
||||||
if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) {
|
if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
girara_list_iterator_next(zathura->jumplist.cur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue