url-mode: fix key sequence generation

* We were using the ‘back’ element of the list as prefix for the next
  iteration of sequences, instead of the element at index ‘offset’

* ALEN() on a wchar_t[] includes the NULL terminator. We don’t want
  that.
This commit is contained in:
Daniel Eklöf 2021-02-07 00:01:29 +01:00
parent 672c414b91
commit ddd6f1d944
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 57 additions and 37 deletions

View file

@ -229,7 +229,7 @@ enum url_action { URL_ACTION_COPY, URL_ACTION_LAUNCH };
struct url {
wchar_t *url;
wchar_t *text;
wchar_t key[4];
wchar_t *key;
struct coord start;
struct coord end;
enum url_action action;