mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
url-mode: store URL in UTF-8, not UTF-32
The only time the URL is actually in UTF-32 is when we’re collecting it (auto-detecting it) from the grid, since cells store their character(s) in UTF-32. Everything *after* that prefers the URL in UTF-8. So, do the conversion while collecting the URL. This patch also changes the URL activation code to strip the ‘file://user@host/’ prefix from file URIs that refer to files on the *local* computer.
This commit is contained in:
parent
0bda60aacc
commit
3339915d20
2 changed files with 61 additions and 44 deletions
|
|
@ -227,7 +227,7 @@ typedef tll(struct ptmx_buffer) ptmx_buffer_list_t;
|
|||
|
||||
enum url_action { URL_ACTION_COPY, URL_ACTION_LAUNCH };
|
||||
struct url {
|
||||
wchar_t *url;
|
||||
char *url;
|
||||
wchar_t *text;
|
||||
wchar_t *key;
|
||||
struct coord start;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue