<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/selection.c, branch releases/1.28</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.28</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.28'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-08-06T10:44:04Z</updated>
<entry>
<title>selection: check column when updating selection</title>
<updated>2026-08-06T10:44:04Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-07-31T04:49:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=919e06c8438bbbc9b214f2caacfe14ea031844e3'/>
<id>urn:sha1:919e06c8438bbbc9b214f2caacfe14ea031844e3</id>
<content type='text'>
Selection coordinates may appear outside of the terminal grid
(e.g., during the "fast resize" stage of delayed resize),
resulting in bad width passed to pixman_region32_union_rect().
</content>
</entry>
<entry>
<title>selection: find-quote-right: assert next-row &gt; 0</title>
<updated>2026-07-30T05:29:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-07-30T05:29:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=38b3424a1148779a659ea26077965518118c8e9f'/>
<id>urn:sha1:38b3424a1148779a659ea26077965518118c8e9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: fixed segfault when quote is on newline</title>
<updated>2026-07-30T05:17:14Z</updated>
<author>
<name>Emily Vlasics</name>
<email>e.vlasics@mail.utoronto.ca</email>
</author>
<published>2026-07-29T03:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5913184de4bfd945bec70333a752e02dac0b8500'/>
<id>urn:sha1:5913184de4bfd945bec70333a752e02dac0b8500</id>
<content type='text'>
Closes #2405
</content>
</entry>
<entry>
<title>selection: fix word boundary check</title>
<updated>2026-07-21T08:56:02Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-07-10T15:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=11e3fa0d59da71267e5c7f5cb16c502d15901eb7'/>
<id>urn:sha1:11e3fa0d59da71267e5c7f5cb16c502d15901eb7</id>
<content type='text'>
This patch fixes rightmost boundary check for a word wrapped to
another line, where a multi-column character appears as the last
character in the original line.

Closes #2411
</content>
</entry>
<entry>
<title>selection: escape quotes in file names being DnD:ed on the command line</title>
<updated>2026-06-12T16:49:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-12T16:49:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ca73ec71d5747d2c0c68b8b562cee3bb80b773ac'/>
<id>urn:sha1:ca73ec71d5747d2c0c68b8b562cee3bb80b773ac</id>
<content type='text'>
Closes #2363
</content>
</entry>
<entry>
<title>selection: fix block selection direction update</title>
<updated>2026-06-12T15:36:42Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-05-23T22:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=382e9a31c5c631258da8f6ebb17f1b9aecb92e6b'/>
<id>urn:sha1:382e9a31c5c631258da8f6ebb17f1b9aecb92e6b</id>
<content type='text'>
This patch fixes a condition check in selection_update(), so that
during block selection, the selection area no longer gets incorrectly
updated when selecting back across the starting column.
</content>
</entry>
<entry>
<title>selection: do not copy empty text</title>
<updated>2026-05-22T09:49:46Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-05-20T18:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4bf60d0fbcad533c5131288617caae67342c1065'/>
<id>urn:sha1:4bf60d0fbcad533c5131288617caae67342c1065</id>
<content type='text'>
Copy-on-select (configured with 'selection-target') may accidentally
clear the clipboard, if the user drags the mouse a little bit when
clicking inside a terminal window.

Now we only copy if there is actual text being selected.

Closes #2327
</content>
</entry>
<entry>
<title>osc-52: don't strip any control characters, and don't do newline conversion</title>
<updated>2026-03-22T17:57:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-03-02T07:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=46a9cb8aab3145c8d4083aea485eaf7e2d44bf51'/>
<id>urn:sha1:46a9cb8aab3145c8d4083aea485eaf7e2d44bf51</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix assertion failure triple-clicking line with quote in last column</title>
<updated>2025-11-12T06:41:35Z</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2025-11-07T06:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5cb8ff2e9c51c528589e5e1ef78b9a6bd554fc0d'/>
<id>urn:sha1:5cb8ff2e9c51c528589e5e1ef78b9a6bd554fc0d</id>
<content type='text'>
By default, triple-click tries to select quoted strings within a
logical line.  This also works if the line spans multiple screen lines.

If there is a quote character in the last column:

	printf %"$COLUMNS"s \'; printf wrapped; sleep inf

and I triple-click on the following soft-wrapped line, there's an
assertion failure because the column next to the quote is out of range.

The quote position has been found by walking at least one cell
backwards from "pos". This means that if the quote position is in
the very last column, there must be a row below.

Also move the assertion to be a pre-condition, though that's debatable.
</content>
</entry>
<entry>
<title>selection: fix crash when tripple clicking in a region containing NUL characters</title>
<updated>2024-12-22T06:09:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-12-22T06:09:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=67bd5dd460d646d49b9959ce3190272f2bfe06be'/>
<id>urn:sha1:67bd5dd460d646d49b9959ce3190272f2bfe06be</id>
<content type='text'>
If a cell contains a NUL character, it was incorrectly treated as a
quote, later triggering an assertion.

Patch by Johannes Altmanninger
</content>
</entry>
<entry>
<title>selection: set row-&gt;dirty when clearing the cell-&gt;attrs.clean bit</title>
<updated>2024-09-21T07:11:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-20T15:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=49ed8b5e21c5a46b9e32ae941ab2dbc2a0f61b88'/>
<id>urn:sha1:49ed8b5e21c5a46b9e32ae941ab2dbc2a0f61b88</id>
<content type='text'>
Closes #1715
</content>
</entry>
<entry>
<title>Don't use fancy Unicode quotes, stick to ASCII</title>
<updated>2024-02-06T11:36:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7999975016a57cc0a2c2e20bc55f29de32df7044'/>
<id>urn:sha1:7999975016a57cc0a2c2e20bc55f29de32df7044</id>
<content type='text'>
</content>
</entry>
<entry>
<title>util: add streq() function and use in place of strcmp(...) == 0</title>
<updated>2024-02-05T11:09:52Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-01-24T23:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0f3703ae6c4084f9275cfc78d87e5604cc27a10'/>
<id>urn:sha1:e0f3703ae6c4084f9275cfc78d87e5604cc27a10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: find_word_boundary: ensure row number is bounded</title>
<updated>2023-10-08T08:38:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-03T12:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ca128ae3802dde3b2bafab190a09911589d23e8a'/>
<id>urn:sha1:ca128ae3802dde3b2bafab190a09911589d23e8a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: selection_update() uses view-local coordinates</title>
<updated>2023-10-08T08:38:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-27T14:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5e013cad78a1989f4deb0972a465dfcdad0dc1d2'/>
<id>urn:sha1:5e013cad78a1989f4deb0972a465dfcdad0dc1d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: add more key bindings to extend the current match</title>
<updated>2023-10-08T08:38:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-26T15:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=78665a7e809afd470e1236867761d51de9737eaa'/>
<id>urn:sha1:78665a7e809afd470e1236867761d51de9737eaa</id>
<content type='text'>
This patch adds the following new search key bindings:

* extend-char (shift+right)
* extend-line-down (shift+down)
* extend-backward-char (shift+left)
* extend-backward-to-word-boundary (ctrl+shift+left)
* extend-backward-to-next-whitespace (ctrl+shift+alt+left)
* extend-line-up (shift+up)

They can be used to extend the search match (i.e. the selection).

This patch also adds an initial set of key bindings to scroll in the
scrollback history:

* scrollback-up-page
* scrollback-down-page

These work just like the key bindings for the normal mode. Also note
that it was already possible to scroll using the mouse.

This patch also fixes a couple of search mode bugs:

* crashing when a search match ends in the last column
* grapheme clusters not being matched correctly
* Search match not being "extendable" after a pointer leave event
* A few others, related to either large matches, or extending matches
  after moving the viewport.

There are still a couple of (known) issues:

* A search match isn't correctly highlighted if its *starting* point
  is outside the viewport.
* Extending the match to end of the scrollback (i.e. the most recent
  output) is simply buggy.

Related to #419
</content>
</entry>
<entry>
<title>selection: add support for selecting the contents of a quote</title>
<updated>2023-09-19T14:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-19T14:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1719ff93a75ad886ed53be468f7faa12f530e9f3'/>
<id>urn:sha1:1719ff93a75ad886ed53be468f7faa12f530e9f3</id>
<content type='text'>
This patch changes the default of triple clicking, from selecting the
current logical row, to first trying to select the contents of the
quote under the cursor, and if failing to find a quote, selecting the
current row (like before).

This is implemented by adding a new key binding, 'select-quote'.

It will search for surrounding quote characters, and if one is found
on each side of the cursor, the quote is selected. If not, the entire
row is selected instead.

Subsequent selection operations will behave as if the selection is
either a word selection (a quote was found), or a row selection (no
quote found).

Escaped quote characters are not supported: "foo \" bar" will match
'foo \', and not 'foo " bar'.

Mismatched quotes are not custom handled. They will simply not match.

Nested quotes ("123 'abc def' 456") are supported.

Closes #1364
</content>
</entry>
<entry>
<title>selection: send_clipboard_or_primary(): handle selection text being NULL</title>
<updated>2023-07-22T09:21:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-22T09:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fc973a3bb934de7fe6001be7b6c39714e7b5470d'/>
<id>urn:sha1:fc973a3bb934de7fe6001be7b6c39714e7b5470d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: selection_on_rows(): typo: row_start -&gt; row_end</title>
<updated>2022-11-24T18:18:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-11-24T16:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0fc8b65a2b77a5c4dd066e4d49be470ee1d1f70a'/>
<id>urn:sha1:0fc8b65a2b77a5c4dd066e4d49be470ee1d1f70a</id>
<content type='text'>
This fixes an issue where selections in the scroll margins were not
detected correctly. This meant they weren’t canceled as they should
have been, which in turn caused a visual glitch where text appeared to
be selected, but were in fact not.
</content>
</entry>
<entry>
<title>selection: scroll down: handle non-full scrollback correctly</title>
<updated>2022-10-16T08:31:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-10-14T16:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=89744f8123aadd58b74ea7b5038c3302c1ed75ed'/>
<id>urn:sha1:89744f8123aadd58b74ea7b5038c3302c1ed75ed</id>
<content type='text'>
When determining whether or not to cancel a selection (due to it, or
part of it, being "scrolled out"), we assumed the scrollback was full.

This patch changes the implementation to compare the scrollback
relative selection coordinates with the scrollback relative
end-of-the-scrollback coordinates.
</content>
</entry>
</feed>
