mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-29 01:24:56 +01:00
Implement nohlsearch shortcut
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
d3e06883f1
commit
9dde3d9d61
3 changed files with 26 additions and 6 deletions
|
@ -288,12 +288,7 @@ cmd_print(girara_session_t* session, girara_list_t* UNUSED(argument_list))
|
|||
bool
|
||||
cmd_nohlsearch(girara_session_t* session, girara_list_t* UNUSED(argument_list))
|
||||
{
|
||||
g_return_val_if_fail(session != NULL, false);
|
||||
g_return_val_if_fail(session->global.data != NULL, false);
|
||||
zathura_t* zathura = session->global.data;
|
||||
|
||||
document_draw_search_results(zathura, false);
|
||||
render_all(zathura);
|
||||
sc_nohlsearch(session, NULL, NULL, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1458,3 +1458,16 @@ sc_exec(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
|||
|
||||
return girara_sc_exec(session, argument, event, t);
|
||||
}
|
||||
|
||||
bool
|
||||
sc_nohlsearch(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t))
|
||||
{
|
||||
g_return_val_if_fail(session != NULL, false);
|
||||
g_return_val_if_fail(session->global.data != NULL, false);
|
||||
zathura_t* zathura = session->global.data;
|
||||
|
||||
document_draw_search_results(zathura, false);
|
||||
render_all(zathura);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -292,4 +292,16 @@ bool sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_even
|
|||
*/
|
||||
bool sc_exec(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
|
||||
|
||||
/**
|
||||
* Remove search highlights.
|
||||
*
|
||||
* @param session The used girara session
|
||||
* @param argument The used argument
|
||||
* @param event Girara event
|
||||
* @param t Number of executions
|
||||
* @return true if no error occurred otherwise false
|
||||
*/
|
||||
bool sc_nohlsearch(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
|
||||
|
||||
|
||||
#endif // SHORTCUTS_H
|
||||
|
|
Loading…
Reference in a new issue