From 61cabdac13986e6cb2ba69e81d5934f55d92a1a9 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 27 Aug 2019 17:23:28 +0200 Subject: search: wip: re-direct input while searching, and build a search buffer This adds a new state, 'is_searching'. While active, input is re-directed, and stored in a search buffer. In the future, we'll use this buffer and search for its content in the scrollback buffer, and move the view and create a selection on matches. When rendering in 'is_searching', everything is dimmed. In the future, we'll render the current search buffer on-top of the dimmed "regular" terminal output. --- search.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 search.h (limited to 'search.h') diff --git a/search.h b/search.h new file mode 100644 index 00000000..4ea59c1f --- /dev/null +++ b/search.h @@ -0,0 +1,8 @@ +#pragma once + +#include +#include "terminal.h" + +void search_begin(struct terminal *term); +void search_cancel(struct terminal *term); +void search_input(struct terminal *term, uint32_t key, xkb_keysym_t sym, xkb_mod_mask_t mods); -- cgit v1.3