<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/selection.c, branch 1.6.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-01-27T09:54:37Z</updated>
<entry>
<title>selection: don’t replace \r\n and \n with \r in bracketed paste mode</title>
<updated>2021-01-27T09:54:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-27T09:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7049c95b62312ac57cbc67a6030ddb77a75f66a1'/>
<id>urn:sha1:7049c95b62312ac57cbc67a6030ddb77a75f66a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: no xassert() in the releases/1.6 branch</title>
<updated>2021-01-26T19:48:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-26T19:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=567071e48a8e2f677198bd9fc0e6099f54730a56'/>
<id>urn:sha1:567071e48a8e2f677198bd9fc0e6099f54730a56</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: remove duplicate ‘ESC’ in switch case</title>
<updated>2021-01-26T19:47:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-23T10:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7611a6c7fcc8f0f2d70fed5ba435d669376b723e'/>
<id>urn:sha1:7611a6c7fcc8f0f2d70fed5ba435d669376b723e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: DEL is 0x7f, not 0x1f</title>
<updated>2021-01-26T19:47:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-23T10:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c8fdd3a2149b1212506037d1cb86e15fb3411865'/>
<id>urn:sha1:c8fdd3a2149b1212506037d1cb86e15fb3411865</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: codespell: stript -&gt; strip</title>
<updated>2021-01-26T19:47:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-23T10:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=94d587fa6a3f09b8fa2c4259b27ab04e86388077'/>
<id>urn:sha1:94d587fa6a3f09b8fa2c4259b27ab04e86388077</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: strip non-formatting C0, BS, HT and DEL from pasted text</title>
<updated>2021-01-26T19:47:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-23T10:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f8856ee7d4343ee4f868dfd5b2841f2c0db5ec0'/>
<id>urn:sha1:9f8856ee7d4343ee4f868dfd5b2841f2c0db5ec0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: unbreak text/uri-list decoding: we’re not using \r, not \n</title>
<updated>2021-01-26T19:47:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-21T14:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=579f3cf8e397bb427098f1bf2bdf3cd2cd19152e'/>
<id>urn:sha1:579f3cf8e397bb427098f1bf2bdf3cd2cd19152e</id>
<content type='text'>
Before passing the pasted text to the decoder, we now replace \r\n,
and \n, with \r.

The URI decoder was looking for a \n, which meant we failed to split
up the list and instead pasted a single “multi-line” URI.
</content>
</entry>
<entry>
<title>selection: replace \r\n and \n with \r, and strip \e from pasted text</title>
<updated>2021-01-26T19:47:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-20T18:20:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f32b9242419edea9c6c4812ee17fbbe5a9514e1d'/>
<id>urn:sha1:f32b9242419edea9c6c4812ee17fbbe5a9514e1d</id>
<content type='text'>
Closes #305
Closes #306
</content>
</entry>
<entry>
<title>selection: uri decode: move zero-length check into decode_one_uri()</title>
<updated>2021-01-21T10:56:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-12T13:56:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bd49260e413dfecf6ce32c771cb81f2586cc67da'/>
<id>urn:sha1:bd49260e413dfecf6ce32c771cb81f2586cc67da</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: add a ‘finish’ function, called at the end of receiving clipboard data</title>
<updated>2021-01-21T10:55:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-12T13:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4303401f69a92cfc1939354fe6ac2fb6489c01be'/>
<id>urn:sha1:4303401f69a92cfc1939354fe6ac2fb6489c01be</id>
<content type='text'>
This is necessary to decode the final URI in a text/uri-list offer if
it hasn’t been newline terminated.
</content>
</entry>
<entry>
<title>selection: URI decoder: break out decoding of a single URI</title>
<updated>2021-01-21T10:55:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-12T13:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f5e25956660c0eccf6058ba6998ec42057851d9'/>
<id>urn:sha1:7f5e25956660c0eccf6058ba6998ec42057851d9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: rework mouse button/motion handling</title>
<updated>2020-12-12T18:05:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-12T18:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ff96ce1e91e5a8de451541cc7584fb6f64a6564b'/>
<id>urn:sha1:ff96ce1e91e5a8de451541cc7584fb6f64a6564b</id>
<content type='text'>
Store a list of currently pressed buttons, and which surface they
belong to (i.e. which surface that received the press).

Then, in motion events (with a button pressed, aka drag operations),
send the event to the “original” surface (that received the press).

Also send release events to the originating surface.

This means a surface receiving a press will always receive a
corresponding release. And no one will receive a release event without
a corresponding press event.

Motion events with a button pressed will *always* use the *first*
button that was pressed. I.e. if you press a button, start dragging,
and then press another button, we keep generating motion events for
the *first* button.
</content>
</entry>
<entry>
<title>selection: do not try to paste un-handled mime types</title>
<updated>2020-11-30T19:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-30T19:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9e1746cc29321141454c8c8c52716cf59243d963'/>
<id>urn:sha1:9e1746cc29321141454c8c8c52716cf59243d963</id>
<content type='text'>
Closes #230
</content>
</entry>
<entry>
<title>selection: offer clipboard content in more mime types</title>
<updated>2020-11-30T19:02:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-30T19:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=043b74100803a3fca7220ad71778182aa3b84c80'/>
<id>urn:sha1:043b74100803a3fca7220ad71778182aa3b84c80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: fix enum type</title>
<updated>2020-11-06T19:12:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-06T19:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2281ee852a56cce49c97d8169b700c849dd6d6df'/>
<id>urn:sha1:2281ee852a56cce49c97d8169b700c849dd6d6df</id>
<content type='text'>
enum selection_scroll_direction is used when extending a selection by
auto-scrolling the terminal content while the mouse is outside the
grid.

What we want is enum selection_direction.
</content>
</entry>
<entry>
<title>selection: explicitly set direction when right-click extending</title>
<updated>2020-11-04T18:01:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-04T18:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a8fb51a34cf488712129850b68566e6b31f0e112'/>
<id>urn:sha1:a8fb51a34cf488712129850b68566e6b31f0e112</id>
<content type='text'>
Fixes an issue where right-click-and-dragging to extend a selection
caused one cell being removed from the selection.

Closes #180
</content>
</entry>
<entry>
<title>selection: do mime-type based decoding before passing data to callback</title>
<updated>2020-11-01T10:52:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-01T10:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=43f293f22ed1566939364f6edeb4bd28283ecab4'/>
<id>urn:sha1:43f293f22ed1566939364f6edeb4bd28283ecab4</id>
<content type='text'>
The intention here is to make *all* text_from_clipboard() and
text_from_primary() callers benefit from mime-type base
decoding (e.g. URI list decoding).

Previously, the decoding was done *in* the callback, which meant only
the “default” clipboard/primary selection paste functions, and DnD,
recognized URI lists.
</content>
</entry>
<entry>
<title>selection: dnd: fix wl_data_offer_destroy() race</title>
<updated>2020-10-31T09:36:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-31T09:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=102d4975a1e9cecb7850f668dc44b52857bf66fe'/>
<id>urn:sha1:102d4975a1e9cecb7850f668dc44b52857bf66fe</id>
<content type='text'>
At the end of a drag-and-drop operation, we need to call
`wl_data_offer_finish()`.

We *must* ensure the data offer hasn’t been destroyed before
that. This could previously happen if the compositor decided to send a
regular clipboard offer *after* we had started a drop operation,
but *before* it had finished. The dnd offer was then destroyed when
the clipboard offer was received, causing us to crash in
`wl_data_offer_finish()`.

To handle this, let the receive_offer_context take over ownership of
the data_offer pointer, and “manually” destroy it *after* calling
`wl_data_offer_finish()` in `receive_dnd_done()`.

Note: we should not, and can not, do the same thing for regular
clipboard and primary selection offers; such offers can be used
multiple times and should *not* be destroyed after a single copy
operation.
</content>
</entry>
<entry>
<title>codespell: fix misspelled words</title>
<updated>2020-10-28T18:34:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-28T18:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bb43695426a769f6e471e6753017b3e60fb6edae'/>
<id>urn:sha1:bb43695426a769f6e471e6753017b3e60fb6edae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>selection: add support for different mime-types</title>
<updated>2020-10-28T18:16:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-28T18:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=be22fefdc73c8b2ca8375a1b3f19c8d05de18e24'/>
<id>urn:sha1:be22fefdc73c8b2ca8375a1b3f19c8d05de18e24</id>
<content type='text'>
Add support for `text/plain`, `text/plain;charset=utf-8` and
`text/uri-list` to regular copy operations (both from clipboard and
primary selection) and drag-and-drop operations.
</content>
</entry>
</feed>
