Daniel Eklöf
61318d068e
search: utility functions distance_{next,prev}_word()
...
These functions calculate the distance from the current cursor to the
next/previous word.
2019-08-30 19:36:37 +02:00
Daniel Eklöf
db291573b7
Revert "search: for now, reset search match state whenever the buffer changes"
...
This reverts commit 9c6ece747e .
2019-08-29 21:16:25 +02:00
Daniel Eklöf
9c6ece747e
search: for now, reset search match state whenever the buffer changes
2019-08-29 21:10:13 +02:00
Daniel Eklöf
4c9e7d0c19
search: call render_search_box() from search_inptu()
2019-08-29 21:09:49 +02:00
Daniel Eklöf
4d0ea11454
search: add basic cursor navigation support
2019-08-29 21:05:18 +02:00
Daniel Eklöf
10649178f8
search: insert new characters at cursor, not at the end of the buffer
2019-08-29 21:03:46 +02:00
Daniel Eklöf
6003b87813
search: search_cancel: reset cursor position
2019-08-29 21:03:16 +02:00
Daniel Eklöf
6d5f200429
search: turn info log to a debug log
2019-08-29 20:23:59 +02:00
Daniel Eklöf
7d920a6d1b
search: remove INFO log (that really was a debug log)
2019-08-29 20:23:55 +02:00
Daniel Eklöf
1e4b11b0fa
search: don't destroy/recreate search (sub)surface
...
Create the sub-surface once, at startup. Then, instead of destroying
it when committing/cancelling a search, unmap it (by attaching a NULL
buffer to it).
2019-08-29 20:22:07 +02:00
Daniel Eklöf
2c3ab701e7
search: move render() function to the 'render' module
2019-08-29 20:18:06 +02:00
Daniel Eklöf
44a353a7f7
search: move wayland surface variables into the term struct
2019-08-29 20:15:33 +02:00
Daniel Eklöf
66912cbfb5
search: use a sub-surface to render the search buffer
2019-08-29 19:34:41 +02:00
Daniel Eklöf
94b4c916ee
search: cancel existing selection when starting a new search
2019-08-28 21:54:02 +02:00
Daniel Eklöf
0d0ee8f378
search: log search buffer at INFO level
...
... until we actually render the search buffer somehow
2019-08-28 21:03:30 +02:00
Daniel Eklöf
b8b43e2eab
search: fix start/end row in selection
2019-08-28 17:28:26 +02:00
Daniel Eklöf
64179bce46
search: start search in current view, rather than from end-of-output
2019-08-28 17:28:26 +02:00
Daniel Eklöf
064063fa49
search: match case insensitive
2019-08-27 21:16:57 +02:00
Daniel Eklöf
bd5e579867
search: sort includes
2019-08-27 21:11:40 +02:00
Daniel Eklöf
36350b01a5
search: disable log output
2019-08-27 21:11:29 +02:00
Daniel Eklöf
2759152285
search: loop through the *entire* scrollback buffer
2019-08-27 21:09:37 +02:00
Daniel Eklöf
2895f8fa10
search: cancel selection and clear match stats when we don't match
2019-08-27 19:58:44 +02:00
Daniel Eklöf
c3b5fa82be
search: 'len' is unused in release builds (it's only used in an assert)
2019-08-27 19:58:31 +02:00
Daniel Eklöf
c1bbb64a4d
search: return early after committing a search
...
This fixes an issue where the selection was finalized, but then
cleared.
2019-08-27 19:56:16 +02:00
Daniel Eklöf
d1974913f7
search: search_update() is always called at end of search_input()
2019-08-27 19:56:02 +02:00
Daniel Eklöf
d518d9dafb
search: don't create a new selection when match start coords haven't changed
2019-08-27 19:55:41 +02:00
Daniel Eklöf
aee5045395
search: wip: initial search matching
...
* match search buffer against scrollback content
* adjust view to ensure matched content is visible
* create selection on a successful match
* finalize selection when user presses enter (to "commit" the search)
* ctrl+r searches for the next match. Needs more work though.
2019-08-27 19:33:19 +02:00
Daniel Eklöf
61cabdac13
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.
2019-08-27 17:23:28 +02:00