mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 16:54:57 +01:00
Fix cb_jumplist_change
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
8409fb2a2d
commit
89113e3d93
1 changed files with 3 additions and 5 deletions
8
config.c
8
config.c
|
@ -31,17 +31,15 @@ cb_jumplist_change(girara_session_t* session, const char* name,
|
||||||
g_return_if_fail(name != NULL);
|
g_return_if_fail(name != NULL);
|
||||||
zathura_t* zathura = session->global.data;
|
zathura_t* zathura = session->global.data;
|
||||||
|
|
||||||
if (g_strcmp0(name, "jumplist-size") != 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*(int *)value < 0) {
|
if (*(int *)value < 0) {
|
||||||
zathura->jumplist.max_size = 0;
|
zathura->jumplist.max_size = 0;
|
||||||
} else {
|
} else {
|
||||||
zathura->jumplist.max_size = *(int *)value;
|
zathura->jumplist.max_size = *(int *)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
zathura_jumplist_trim(zathura);
|
if (zathura->jumplist.list != NULL && zathura->jumplist.size != 0) {
|
||||||
|
zathura_jumplist_trim(zathura);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue