<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/url-mode.c, branch 1.26.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.26.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.26.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-08-31T09:36:28Z</updated>
<entry>
<title>config: add 'uppercase-regex-insert'</title>
<updated>2025-08-31T09:36:28Z</updated>
<author>
<name>Ryan Roden-Corrent</name>
<email>git@rrc.codes</email>
</author>
<published>2025-08-07T12:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=298196365c06c13dd16a74e34e03d9de93670473'/>
<id>urn:sha1:298196365c06c13dd16a74e34e03d9de93670473</id>
<content type='text'>
This makes the "uppercase hint character inserts selected text"
behavior added in #1975 configurable, as it can have unexpected
behavior for some users.

It defaults to "on", preserving the new behavior of `foot`, after

Fixes #2159.
</content>
</entry>
<entry>
<title>url-mode: for some reason we sorted the label letters before assigning them</title>
<updated>2025-07-29T09:18:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-07-29T09:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=83303bd2a461b5917de51d8740999cbdb46e7986'/>
<id>urn:sha1:83303bd2a461b5917de51d8740999cbdb46e7986</id>
<content type='text'>
Don't do this. Now that we **don't** sort them, the first letter
chosen by the user is always assigned to the bottom most URL.

Closes #2140 (again)
</content>
</entry>
<entry>
<title>url-mode: assign label keys in reverse order</title>
<updated>2025-07-17T08:40:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-07-17T08:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc290fa9b0c36e90f6af978f839c083d05f22a95'/>
<id>urn:sha1:cc290fa9b0c36e90f6af978f839c083d05f22a95</id>
<content type='text'>
The _last_ URL is often the one you are interested in, and with this
change, it is always assigned the first (and thus the same) key.

Closes #2140
</content>
</entry>
<entry>
<title>quirks: remove subsurface unmap quirk for Sway</title>
<updated>2025-06-09T05:08:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-06-09T05:08:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7347f4beb1314df12e834a260f18feae8b775a5a'/>
<id>urn:sha1:7347f4beb1314df12e834a260f18feae8b775a5a</id>
<content type='text'>
Sway used to have an issue where unmapping a subsurface did not damage
the surface below (https://github.com/swaywm/sway/issues/6960).

This has been fixed for quite some time now, so let's remove the
quirk.
</content>
</entry>
<entry>
<title>Paste URL/regex selection to prompt if key is uppercase.</title>
<updated>2025-05-01T11:53:11Z</updated>
<author>
<name>Ryan Roden-Corrent</name>
<email>git@rrc.codes</email>
</author>
<published>2025-04-28T23:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0ea572dc63083e0d415382da2df8050a70f8cd07'/>
<id>urn:sha1:0ea572dc63083e0d415382da2df8050a70f8cd07</id>
<content type='text'>
In copy-regex/show-urls-copy mode, if the last input character was
uppercase, copy the selection to the clipboard _and_ paste it. This is
useful for taking a file path from a command output:(log, git, test
failure, etc.) and using it in another command.

This is inspired by the behavior of copy mode in wezterm:
https://wezterm.org/quickselect.html

I could have made it check every character in the hint, but it seemed
fine to assume that if the last character was uppercase, the user
wanted this behavior.

Closes #1975.
</content>
</entry>
<entry>
<title>url-mode: fix double-width characters not being handled correctly</title>
<updated>2025-04-13T06:28:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-13T06:26:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b93d2f042c378e9a2a6d0882c79331492d5dee09'/>
<id>urn:sha1:b93d2f042c378e9a2a6d0882c79331492d5dee09</id>
<content type='text'>
When a regex matches a string containing double-width characters, the
CELL_SPACER values were included in the URL string. This meant the
final URL (either launched, or copied) weren't handled correctly, as
invalid UTF-8 sequences were inserted in the middle of the string.

Closes #2027
</content>
</entry>
<entry>
<title>url-mode: fix crash when opening multiple urls with persist mode</title>
<updated>2025-03-20T07:52:10Z</updated>
<author>
<name>llyyr</name>
<email>llyyr.public@gmail.com</email>
</author>
<published>2025-03-19T04:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc99db5bc4f02fffe0dde7483fb91a8056e112d8'/>
<id>urn:sha1:cc99db5bc4f02fffe0dde7483fb91a8056e112d8</id>
<content type='text'>
Fixes: 051cd6ecfc8b98e1d80b399ebea40207fe040750
Closes #2000
</content>
</entry>
<entry>
<title>url-mode: regex: don't try to NULL-terminate an invalid vline</title>
<updated>2025-02-10T12:09:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-10T12:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c63202ee0ee45182ec5ab440262e63b85104e59e'/>
<id>urn:sha1:c63202ee0ee45182ec5ab440262e63b85104e59e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: terminate last virtual line before regex matching</title>
<updated>2025-02-10T07:54:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-10T07:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=98db9658136cfc41b496b005c9df537f59aed6b8'/>
<id>urn:sha1:98db9658136cfc41b496b005c9df537f59aed6b8</id>
<content type='text'>
If the last line doesn't have a hard linebreak, it was never NULL
terminated, causing regexec() to crash on an out-of-bounds access.
</content>
</entry>
<entry>
<title>Fix URL detection regression on lines with NUL bytes</title>
<updated>2025-02-10T07:06:08Z</updated>
<author>
<name>Johannes Altmanninger</name>
<email>aclopte@gmail.com</email>
</author>
<published>2025-02-09T08:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4e5ad6e013666e4724b4de4273ac445adceb0865'/>
<id>urn:sha1:4e5ad6e013666e4724b4de4273ac445adceb0865</id>
<content type='text'>
Commit 859b4c89 (url-mode: wip: more work on regex matching,
2025-01-30) regressed URL detection in weechat. Some of the URLs
still work but others don't. This is because regexec() stops at the
first NUL, thus skipping the rest of the line. weechat seems create
NUL cells between their UI widgets.

Work around this by replacing NUL with space. This is probably correct
because selecting and copying those cells also translates to space
(not sure where in the code).
</content>
</entry>
<entry>
<title>url-mode: use the first *sub* expression as URL</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T12:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a984531ce57f30bc9ec7f664e7c2e8c77b3f439e'/>
<id>urn:sha1:a984531ce57f30bc9ec7f664e7c2e8c77b3f439e</id>
<content type='text'>
When auto-matching URLs (or custom regular expressions), use the
first *subexpression* as URL, rather than the while regex match.

This allows us to write custom regular expressions with prefix/suffix
strings that should not be included in the presented match.
</content>
</entry>
<entry>
<title>config+url: add support for user-defined regex patterns</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T07:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=051cd6ecfc8b98e1d80b399ebea40207fe040750'/>
<id>urn:sha1:051cd6ecfc8b98e1d80b399ebea40207fe040750</id>
<content type='text'>
Users can now define their own regex patterns, and use them via key
bindings:

    [regex:foo]
    regex=foo(bar)?
    launch=path-to-script-or-application {match}

    [key-bindings]
    regex-launch=[foo] Control+Shift+q
    regex-copy=[foo] Control+Mod1+Shift+q

That is, add a section called 'regex:', followed by an
identifier. Define a regex and a launcher command line.

Add a key-binding, regex-launch and/or regex-copy (similar to
show-urls-launch and show-urls-copy), and connect them to the regex
with the "[regex-name]" syntax (similar to how the pipe-* bindings
work).
</content>
</entry>
<entry>
<title>url-mode: regex: make sure there's always room for the NULL terminator</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-31T12:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ab4426f9873eee6d83871f9bd03d2d64a5f862b8'/>
<id>urn:sha1:ab4426f9873eee6d83871f9bd03d2d64a5f862b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode+config: wip: add url.regex option</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T11:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d41b28bd027affe67bfd8032a2041241df8be823'/>
<id>urn:sha1:d41b28bd027affe67bfd8032a2041241df8be823</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: wip: regex: tweak debug log message</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T10:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=05207fcde34d742f2e16e8ecfedd90f23a2f8849'/>
<id>urn:sha1:05207fcde34d742f2e16e8ecfedd90f23a2f8849</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: wip: regex: mention changes from original regex</title>
<updated>2025-02-05T12:35:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T10:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6d344f82ee151eb202dd786a63c12492f48fa4b8'/>
<id>urn:sha1:6d344f82ee151eb202dd786a63c12492f48fa4b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: wip: regex: don't allow {}, do allow matched []</title>
<updated>2025-02-05T12:35:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T10:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=031382f428d783cdf692cd17dac9489fb5c0b530'/>
<id>urn:sha1:031382f428d783cdf692cd17dac9489fb5c0b530</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url-mode: wip: more work on regex matching</title>
<updated>2025-02-05T12:35:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T08:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=859b4c8921f5cde8cfc1f358e865ba417fe68a12'/>
<id>urn:sha1:859b4c8921f5cde8cfc1f358e865ba417fe68a12</id>
<content type='text'>
Remove the old auto-detection and instead use the regex matches.
</content>
</entry>
<entry>
<title>url-mode: wip: convert to regex matching for auto-detection</title>
<updated>2025-02-05T12:35:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-30T08:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1c15ee940d0063b7cfa11845c0af537d50ca8acd'/>
<id>urn:sha1:1c15ee940d0063b7cfa11845c0af537d50ca8acd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: match unshifted key-bindings before shifted</title>
<updated>2025-01-31T08:07:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-31T08:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=51128a3484049e5f9b9b74276222977d12554d76'/>
<id>urn:sha1:51128a3484049e5f9b9b74276222977d12554d76</id>
<content type='text'>
That is, try to match e.g. Control+shift+a, before trying to match
Control+A.

In most cases, order doesn't matter. There are however a couple of
symbols where the layout consumes the shift-modifier, and the
generated symbol is the same in both the shifted and unshifted
form. One such example is backspace.

Before this patch, key-bindings with shift-backspace would be ignored,
if there were another key-binding with backspace.

So, for example, if we had one key-binding with Control+Backspace, and
another with Control+Shift+Backspace, the latter would never trigger,
as we would always match the first one.

By checking for unshifted matches first, we ensure
Control+Shift+Backspace does match.
</content>
</entry>
</feed>
