From 2b7c5db1880b54120841c441518108795cb85815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 27 Mar 2021 22:15:44 +0100 Subject: [PATCH 1/2] search: when matching cell content, treat empty cells as spaces --- search.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search.c b/search.c index 30a50ae5..02cea9e0 100644 --- a/search.c +++ b/search.c @@ -241,6 +241,9 @@ matches_cell(const struct terminal *term, const struct cell *cell, size_t search base = composed->base; } + if (composed == NULL && base == 0 && term->search.buf[search_ofs] == L' ') + return 1; + if (wcsncasecmp(&base, &term->search.buf[search_ofs], 1) != 0) return -1; From 0a24d0e40fe9e9a9bfb1dd1f4715f91af8a6168e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 27 Mar 2021 23:02:56 +0100 Subject: [PATCH 2/2] changelog: spaces matches empty cells in scrollback search mode --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b10e083..dec9f961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Update PGO build instructions in `INSTALL.md` (https://codeberg.org/dnkl/foot/issues/418). +* In scrollback search mode, empty cells can now be matched by spaces. ### Deprecated