Skip to content

Implement a Ctrl + Enter behaviour for entries in the address bar - #28

Open
mariospr wants to merge 3 commits into
mainfrom
url-ctrl-enter
Open

mariospr wants to merge 3 commits into
mainfrom
url-ctrl-enter

Conversation

@mariospr

Copy link
Copy Markdown
Member

This matches the behaviour of mainstream browsers where e.g. you just type "foobar" in
the address bar, press Ctrl + Enter, and get "https://www.foobar.com" loaded.

mariospr and others added 3 commits October 23, 2026 00:50
When text is present in the address bar but does not match the format
of a domain, pressing Ctrl + Enter will autocomplete it to end up being
a proper URL including the protocol and the toplevel domain (TLD) parts.

For instance, when pressing Ctrl + Enter in these cases:

  - "domain" -> becomes "https://www.domain.com"
  - "node.js" -> becomes "https://www.node.js.com"
  - "domain.com" -> stays as "https://domain.com"
  - "https://domain" -> stays as "https://domain"

This matches what mainstream browsers already do.
The tests load the public suffix list from src/test-wig-utils.dat, which
the test build passes to wig-utils.c as WIG_PSL_FILE, so their results
do not depend on the version of the list installed on the system.

This adds a new file src/test-wig-utils.c and integrates it with CI.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants