This patch fixes a couple of GString related memory leaks. There is one
left in the cmd_set() function for the 's' type settings, but to fix it
we need to rework settings architecture a bit.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
Currently, 'page', 'offset' and 'scale' are reserved bookmark names.
We should not allow to set arbitary bookmarks with such names.
Also, this patch fixes memory leaks in the cmd_bookmark() function.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
My previous patch a206e5bb1f
(Save zoom level in the bookmarks file) added third varible with special
meaning into the bookmarks file. Add it to the exception list.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
This patch introduces new configuration option: save_zoom_level.
If this option is set (default) zathura will store zoom level
in the bookmarks file on quit and restore it on open.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
Don't update Zathura.State.scroll_percentage when scrolling left/right
to avoid wrong values in the status bar.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
Previous version ignored second argument if more than 2 were given and
quoted the additional arguments leading to lp thinking they represented
a filename.
Before:
:print HPF300 14-15 -o side=onesided
-> lp -d HPF300 -P 1-38 ' -o side=onesided' 'filename'
Now:
:print HPF300 14-15 -o side=onesided
-> lp -d HPF300 -P 14-15 -o side=onesided 'filename'
Signed-off-by: mlq <mlq@pwmt.org>