diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-28 19:06:21 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-17 16:14:10 +0000 |
| commit | e460727afd5fb19ed8bf42d6ecbbd9e9f98a20c5 (patch) | |
| tree | 42be98fa485b7d6c91f5ce4c702bebbebfa672f4 /selection.c | |
| parent | extract: add extract_finish_wide(), and optionally skip stripping trailing empty cells (diff) | |
search: match_to_end_of_word(): refactor
Rewrite match_to_end_of_word() in terms of
* selection_find_word_boundary_right()
* extract_begin() + extract_one() + extract_finish()
This adds a small overhead, in that extract_*() allocates an internal
buffer, from which we then immediately copy, into our newly resized
prompt buffer.
On the other hand, this makes the matching behavior more consistent
with regular mouse selections, and we don’t have to keep two very
similar match-to-next-word-boundary implementations in sync.
Diffstat (limited to 'selection.c')
0 files changed, 0 insertions, 0 deletions
