From ec615d562f3a0ec14387717091c4ec4df7f06c4c Mon Sep 17 00:00:00 2001 From: Louisvh Date: Fri, 5 Feb 2016 04:05:13 +0100 Subject: [PATCH 1/2] Removed unnecessary ifdef, fixed compiler warning If WITH_SYNCTEX is not defined, synctex_editor will always be NULL, so the ifdef is not needed. This gets rid of the "unused variable" warning when compiling without synctex. --- zathura/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/zathura/main.c b/zathura/main.c index b81c630..2671e4c 100644 --- a/zathura/main.c +++ b/zathura/main.c @@ -114,12 +114,10 @@ init_zathura(const char* config_dir, const char* data_dir, return NULL; } -#ifdef WITH_SYNCTEX if (synctex_editor != NULL) { girara_setting_set(zathura->ui.session, "synctex-editor-command", synctex_editor); } -#endif return zathura; } From 9af0064fe2a04a6385b6d4bc52160b0f110de1bd Mon Sep 17 00:00:00 2001 From: Louisvh Date: Fri, 5 Feb 2016 04:18:56 +0100 Subject: [PATCH 2/2] Added quickmark functions to bindable shortcuts. `mark_add` and `mark_evaluate` are now available as rebindable shortcuts. Also added an entry in the zathurarc.5 manpage. --- doc/man/zathurarc.5.rst | 7 +++++++ zathura/config.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/doc/man/zathurarc.5.rst b/doc/man/zathurarc.5.rst index d52c875..c70f524 100644 --- a/doc/man/zathurarc.5.rst +++ b/doc/man/zathurarc.5.rst @@ -307,6 +307,13 @@ The following shortcut functions can be mapped: Zoom in or out. +* ``mark_add`` + Set a quickmark. + +* ``mark_evaluate`` + Go to a quickmark. + + Pass arguments ^^^^^^^^^^^^^^ Some shortcut function require or have optional arguments which influence the diff --git a/zathura/config.c b/zathura/config.c index 626f495..f0037ec 100644 --- a/zathura/config.c +++ b/zathura/config.c @@ -466,6 +466,8 @@ config_load_default(zathura_t* zathura) girara_shortcut_mapping_add(gsession, "goto", sc_goto); girara_shortcut_mapping_add(gsession, "jumplist", sc_jumplist); girara_shortcut_mapping_add(gsession, "bisect", sc_bisect); + girara_shortcut_mapping_add(gsession, "mark_add", sc_mark_add); + girara_shortcut_mapping_add(gsession, "mark_evaluate", sc_mark_evaluate); girara_shortcut_mapping_add(gsession, "navigate", sc_navigate); girara_shortcut_mapping_add(gsession, "navigate_index", sc_navigate_index); girara_shortcut_mapping_add(gsession, "print", sc_print);