<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/search.c, branch 1.7.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-03-28T11:21:18Z</updated>
<entry>
<title>search: when matching cell content, treat empty cells as spaces</title>
<updated>2021-03-28T11:21:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-27T21:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2b7c5db1880b54120841c441518108795cb85815'/>
<id>urn:sha1:2b7c5db1880b54120841c441518108795cb85815</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: rewrite of how we match foot’s own key bindings</title>
<updated>2021-03-04T08:43:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-27T19:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5e64e06a550c2499a23f03749986791136cbbcb9'/>
<id>urn:sha1:5e64e06a550c2499a23f03749986791136cbbcb9</id>
<content type='text'>
Bindings are matched in one out of three ways:

* By translated (by XKB) symbols
* By untranslated symbols
* By raw key codes

A translated symbol is affected by pressed modifiers, some of which
can be “consumed”. Consumed modifiers to not partake in the comparison
with the binding’s modifiers. In this mode, ctrl+shift+2 maps to
ctrl+@ on a US layout.

Untranslated symbols, or un-shifted symbols refer to the “base” symbol
of the pressed key, i.e. it’s unaffected by modifiers. In this mode,
consumed modifiers *do* partake in the comparison with the binding’s
modifiers, and ctrl+shift+2 maps to ctrl+shift+2 on a US layout.

More examples: ctrl+shift+u maps to ctrl+U in the translated lookup,
while ctrl+shift+u maps to ctrl+shift+u in the untranslated lookup.

Finally, we also match raw key codes. This allows our bindings to work
using the same physical keys when the user switches between latin and
non-latin layouts.

This means key bindings in foot.ini *must* not include both +shift+
and a *shifted* key. I.e. ctrl+shift+U is not a valid combo as it
cannot be triggered. Unfortunately, this was how you were supposed to
write bindings up until now... so, we try to detect such bindings, log
a deprecation warning and then “fix” the binding for the user.

When specifying bindings in foot.ini, both ctrl+U and ctrl+shift+u are
valid, and will work. The latter is preferred though, since we cannot
detect the raw key code for the former variant. Personally, I also
prefer the latter one because it is more explicit; it’s more obvious
which keys are involved.

However, in some cases it makes more sense to use the other
variant. Typically for non-letter combos.
</content>
</entry>
<entry>
<title>wayland: drop ‘_surface’ suffix from subsurface struct instances</title>
<updated>2021-02-17T20:48:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T11:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5c8579043dd22a08e872d90a20011f5d6d8d3dc1'/>
<id>urn:sha1:5c8579043dd22a08e872d90a20011f5d6d8d3dc1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: use wayl_win_subsurface_new/destroy()</title>
<updated>2021-02-17T20:48:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T10:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e049124f6d57fb2fd444138ec588b5b3cab80ecc'/>
<id>urn:sha1:e049124f6d57fb2fd444138ec588b5b3cab80ecc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Convert some more uses of xassert(false) to BUG("...")</title>
<updated>2021-02-09T15:16:19Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-02-09T15:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2f81a1d07c3828391bf1b5656a9143aaf3822089'/>
<id>urn:sha1:2f81a1d07c3828391bf1b5656a9143aaf3822089</id>
<content type='text'>
</content>
</entry>
<entry>
<title>key-bindings: refactor: use a single type for all key bindings</title>
<updated>2021-02-08T09:09:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-07T13:46:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03bac9dada76690971943f824637407100f7a3ee'/>
<id>urn:sha1:03bac9dada76690971943f824637407100f7a3ee</id>
<content type='text'>
Up until now, the various key binding modes (“normal”, “search” and
“url”) have used their own struct definitions for their key bindings.

The only reason for this was to have a properly typed “action” (using
the appropriate “action” enum).

This caused lots of duplicated code. This patch refactors this to use
a single struct definition for the “unparsed” key bindings handled by
the configuration, and another single definition for “parsed” bindings
used while handling input.

This allows us to implement configuration parsing, keymap translation
and so on using one set of functions, regardless of key binding mode.
</content>
</entry>
<entry>
<title>search: match composed characters when extending the search string to the next word boundary</title>
<updated>2021-01-26T19:26:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-26T19:26:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2310ffd1b86ffc349a468a2834d6c4307e52809d'/>
<id>urn:sha1:2310ffd1b86ffc349a468a2834d6c4307e52809d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: fix matching of multi-column characters</title>
<updated>2021-01-26T19:05:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-26T19:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fc33619b193f65800692c7db2fe91b6acf9fdc80'/>
<id>urn:sha1:fc33619b193f65800692c7db2fe91b6acf9fdc80</id>
<content type='text'>
We were matching the sub-sequence SPACERs as if they were regular
characters, which obviously failed.
</content>
</entry>
<entry>
<title>search: don’t re-scan the scrollback unless the search string actually has changed</title>
<updated>2021-01-26T18:29:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-24T19:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dd8a6fdd4db044d9ca3c7a3d7c0e5b65059ac1e2'/>
<id>urn:sha1:dd8a6fdd4db044d9ca3c7a3d7c0e5b65059ac1e2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'search-match-composed-characters'</title>
<updated>2021-01-26T18:28:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-26T18:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=89b810261ed89bf108736ec474df2a49f5147691'/>
<id>urn:sha1:89b810261ed89bf108736ec474df2a49f5147691</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: fix matching against composed characters</title>
<updated>2021-01-24T11:05:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-24T11:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d3d5897bb7a477fcea9c7b7404f98ce07522d770'/>
<id>urn:sha1:d3d5897bb7a477fcea9c7b7404f98ce07522d770</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: filter out non-printable characters</title>
<updated>2021-01-24T10:32:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-24T10:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cbf90d67a2abb3b14c4c7217854fa4c47a45c71b'/>
<id>urn:sha1:cbf90d67a2abb3b14c4c7217854fa4c47a45c71b</id>
<content type='text'>
Don’t allow non-printable characters in the search input string.
</content>
</entry>
<entry>
<title>debug: rename assert() to xassert(), to avoid clashing with &lt;assert.h&gt;</title>
<updated>2021-01-16T20:16:00Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-16T20:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e56136ce1192d04a52b01ccb41284f0b7896430e'/>
<id>urn:sha1:e56136ce1192d04a52b01ccb41284f0b7896430e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Print stack trace on assert() failure or when calling fatal_error()</title>
<updated>2021-01-16T19:56:33Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-15T20:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9'/>
<id>urn:sha1:22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9</id>
<content type='text'>
Note: this uses the __sanitizer_print_stack_trace() function from the
AddressSanitizer runtime, so it only works when AddressSanitizer is
in use.
</content>
</entry>
<entry>
<title>selection: combine enum selection_kind with selection_semantic</title>
<updated>2021-01-06T09:53:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-06T09:53:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3a9172342fd69c09d3fddfb26eba12dcbe1e5149'/>
<id>urn:sha1:3a9172342fd69c09d3fddfb26eba12dcbe1e5149</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: use selection_start() to initialize word/row-based selection</title>
<updated>2021-01-04T18:48:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-02T22:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3afc5a723e10313f956234cfd4251ba7a5a7e99c'/>
<id>urn:sha1:3afc5a723e10313f956234cfd4251ba7a5a7e99c</id>
<content type='text'>
This removes the selection_mark_word() and selection_mark_row()
functions. To start a word/row-based selection, use selection_start()
with SELECTION_SEMANTIC_{WORD,ROW}
</content>
</entry>
<entry>
<title>selection: wip: update selection word-wise when initial selection was by word</title>
<updated>2021-01-04T18:48:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-02T20:20:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=30de262d29d703b0cc31799a4abf84239f3caf22'/>
<id>urn:sha1:30de262d29d703b0cc31799a4abf84239f3caf22</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: reset IME state when entering/exiting search mode</title>
<updated>2020-12-07T19:44:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-07T17:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fc2bcf9bc0e1d01d191bd663d5493cfabff54420'/>
<id>urn:sha1:fc2bcf9bc0e1d01d191bd663d5493cfabff54420</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: search: glyph_offset is in *cells*, cursor position in *characters*</title>
<updated>2020-12-07T19:44:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-05T22:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b4a0f5b13b44525bd1dbdbc12e4e412fc9a0a1cb'/>
<id>urn:sha1:b4a0f5b13b44525bd1dbdbc12e4e412fc9a0a1cb</id>
<content type='text'>
When calculating the offset into the search string, from where to
start rendering, take into account that the cursor position is
in *characters*, and the glyph-offset is in *cells*.
</content>
</entry>
<entry>
<title>search: new function: search_add_chars()</title>
<updated>2020-12-07T19:44:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-05T10:49:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f51ce347532d0c0c0169ba6e1d32a09b13481ed4'/>
<id>urn:sha1:f51ce347532d0c0c0169ba6e1d32a09b13481ed4</id>
<content type='text'>
This function inserts a string into the search buffer, at the current
insertion point (i.e. where the cursor is).
</content>
</entry>
</feed>
