diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-27 15:23:28 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-27 15:23:28 +0000 |
| commit | 61cabdac13986e6cb2ba69e81d5934f55d92a1a9 (patch) | |
| tree | 5ad589c35e81ecb86270261514cf623739d99c35 /terminal.h | |
| parent | render: center grid in window (diff) | |
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.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -331,6 +331,13 @@ struct terminal { struct primary primary; } selection; + bool is_searching; + struct { + wchar_t *buf; + size_t len; + size_t sz; + } search; + struct grid normal; struct grid alt; struct grid *grid; @@ -368,6 +375,7 @@ struct terminal { struct buffer *last_buf; /* Buffer we rendered to last time */ bool was_flashing; /* Flash was active last time we rendered */ + bool was_searching; } render; }; |
