<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/search.c, branch 1.6.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-12-07T19:44:15Z</updated>
<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>
<entry>
<title>search: add {clipboard,primary}-paste key bindings</title>
<updated>2020-11-01T11:39:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-01T11:39:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f3e6941c9a9448883ec2df75f025840fce57ee17'/>
<id>urn:sha1:f3e6941c9a9448883ec2df75f025840fce57ee17</id>
<content type='text'>
These bindings copy from the clipboard or primary selection into the
search buffer.

Default bindings:

* clipboard-paste: ctrl+v, ctrl+y
* primary-paste: shift+insert
</content>
</entry>
<entry>
<title>config: add ‘[default].word-delimiters’</title>
<updated>2020-10-09T17:44:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-09T17:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=49f4b3da64d45cee04295ce005ff0399fcfeebe2'/>
<id>urn:sha1:49f4b3da64d45cee04295ce005ff0399fcfeebe2</id>
<content type='text'>
This option lets the user configure which characters act as word
delimiters when selecting text.

This affects both “double clicking”, and ‘ctrl-w’ in scrollback search
mode.

Closes #156
</content>
</entry>
<entry>
<title>don't use empty struct initializers</title>
<updated>2020-08-23T08:07:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-23T05:42:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dabdffafa59f43314333be42aa519d7fff1b4498'/>
<id>urn:sha1:dabdffafa59f43314333be42aa519d7fff1b4498</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: don't update/refresh match when modifier keys are pressed</title>
<updated>2020-08-12T17:40:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-12T16:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8626b4bc1a06e01659baf7cb0c2ab0b171a4c919'/>
<id>urn:sha1:8626b4bc1a06e01659baf7cb0c2ab0b171a4c919</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: fix viewport not moving if we tried to move it past the scrollback start</title>
<updated>2020-08-12T17:40:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-12T16:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b01431e38f96c8d42a5fa37c1b1e1f46bfb60f3a'/>
<id>urn:sha1:b01431e38f96c8d42a5fa37c1b1e1f46bfb60f3a</id>
<content type='text'>
If the match was somewhere near the scrollback beginning, and if the
entire scrollback hadn't yet been filled, we ended up trying to move
the viewport past the beginning of the scrollback, which we then
adjusted in the wrong direction, causing the viewport to not move at
all.

Besides being a bad user experience, since the new match wasn't
visible, foot would also crash if you manually scrolled up to the
match.
</content>
</entry>
<entry>
<title>fix printf-format errors in 32-bit builds</title>
<updated>2020-08-06T21:20:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-06T21:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=019b6bc039f318b150b78a1fec3672db71c74a63'/>
<id>urn:sha1:019b6bc039f318b150b78a1fec3672db71c74a63</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: fix crash when searching the scrollback history</title>
<updated>2020-07-25T09:23:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-25T09:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f82cbaa496f3c9c8210d3e78bee0de038d232e9'/>
<id>urn:sha1:9f82cbaa496f3c9c8210d3e78bee0de038d232e9</id>
<content type='text'>
search_update_selection() was changed in 1.4.x to *first* update the
selection, *then* move the viewport.

This leads to a crash if the new match (selection) is outside the
current viewport; the selection code assumes the updated selection
endpoint is in the visible viewport.

Changing back to *first* move the viewport, *then* update the
selection solves this.
</content>
</entry>
<entry>
<title>search: improve viewport movements</title>
<updated>2020-07-24T15:49:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-24T15:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8d81dde5b8ba0d0b694794c0a223c76cfcff5335'/>
<id>urn:sha1:8d81dde5b8ba0d0b694794c0a223c76cfcff5335</id>
<content type='text'>
* Don't move the viewport if the new match is already fully visible
* When we do have to move the viewport, position it such that the new
  match ends up roughly in the middle.
</content>
</entry>
<entry>
<title>search: re-enable search-commit action</title>
<updated>2020-07-22T15:51:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-22T15:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ac7b229f7cb83535765597519888c3e4a27215d3'/>
<id>urn:sha1:ac7b229f7cb83535765597519888c3e4a27215d3</id>
<content type='text'>
This was disabled while implementing multi-seat support, and I forgot
to fix and re-enable before that feature was merged.
</content>
</entry>
<entry>
<title>multi-seat: re-enable scrollback search support</title>
<updated>2020-07-08T16:20:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-08T16:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04e566492cd831f038afb5ef8908453efca84cde'/>
<id>urn:sha1:04e566492cd831f038afb5ef8908453efca84cde</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: multi-seat support</title>
<updated>2020-07-08T14:45:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-08T14:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c47082506714f458e999f6ff1bf3099dfc4c0c0c'/>
<id>urn:sha1:c47082506714f458e999f6ff1bf3099dfc4c0c0c</id>
<content type='text'>
Compiles and runs, but mouse, clipboard and other things have been
disabled.
</content>
</entry>
<entry>
<title>util.h: new header file defining commonly used macros</title>
<updated>2020-05-01T09:46:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-01T09:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=69c3e744983e37662fa7b4f61482fb1d142e257c'/>
<id>urn:sha1:69c3e744983e37662fa7b4f61482fb1d142e257c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>misc: replace all explicit zero-initializers with empty initializers</title>
<updated>2020-04-13T10:03:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-13T10:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c96a0b3b3ce22f0db45e61160d414258917e4bcd'/>
<id>urn:sha1:c96a0b3b3ce22f0db45e61160d414258917e4bcd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mbstate: fix compile warning on systems where mbstate_t isn't an integral</title>
<updated>2020-04-13T09:58:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-13T09:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d67f437458ed96b55d475a471d1a16da52ca4cd4'/>
<id>urn:sha1:d67f437458ed96b55d475a471d1a16da52ca4cd4</id>
<content type='text'>
An empty initializer still ensures the entire object is
zero-initialized.
</content>
</entry>
<entry>
<title>search: replace hard-coded key bindings with "user configurable" ones</title>
<updated>2020-03-18T14:30:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-18T14:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04191564946d3ba6c1c49e5041e4bd0cda819043'/>
<id>urn:sha1:04191564946d3ba6c1c49e5041e4bd0cda819043</id>
<content type='text'>
They aren't really user configurable. At least not yet.

However, with this, we now handle raw key codes just like the normal
key bindings. Meaning, e.g. ctrl+g, ctrl+a, ctrl+e etc now works while
searching with e.g. a russian layout.
</content>
</entry>
<entry>
<title>input: bindings: don't match raw key code alone - mods must also match</title>
<updated>2020-03-18T13:52:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-18T13:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a69b818a6232a3704e3125e17f7e392382faee84'/>
<id>urn:sha1:a69b818a6232a3704e3125e17f7e392382faee84</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: bind key bindings to raw key codes too</title>
<updated>2020-03-18T13:29:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-18T13:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6d30e7d15de49ba531cd8f8cd99c356d7f1ca0fc'/>
<id>urn:sha1:6d30e7d15de49ba531cd8f8cd99c356d7f1ca0fc</id>
<content type='text'>
Before, when looking for a matching user key binding, we only
matched *symbols*.

This means that the physical keys that generate a specific key binding
is layout dependent. What's worse, it may not even be possible to
generate the key binding at all.

Russian is one such layout, where all the "normal" (us) symbols are
replaced.

By using raw key codes, we can get around this - the key code has a
direct mapping to the physical key.

However, matching raw key codes **only** doesn't always make sense
either. For now, match **both** symbols _and_ key codes. Symbols take
precedence.

TODO: we might have to make this configurable _per binding_.

Note: 'search' mode still uses mostly hardcoded shortcuts that still
have this problem (i.e. ctrl+g doesn't work with a russian layout).
</content>
</entry>
</feed>
