Commit 9dde3d9d authored by Sebastian Ramacher's avatar Sebastian Ramacher

Implement nohlsearch shortcut

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent d3e06883
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment