Preserve trailing space when exiting custom search-engine completion
When a custom search engine is configured, there is currently no convenient way to use the default search/completions for a normal query that begins with its keyword.
For example, suppose you use:
maps: https://www.google.com/maps/search/%sThis is the current behavior (using underscores in place of spaces for clarity):
maps_activates the custommapssearch engine- a backspace will exit the custom search engine, returning you to
maps(no space) - the CSE reactivates, as normal, with a subsequent space
By returning to the input without the trailing space, it is difficult to use the default completions or search engine for a query such as maps_of_london, since you are put in the same initial situation where continuing the query will immediately reactivate the CSE.
Expected behavior
When pressing backspace to exit a CSE, it should preserve the trailing space (leaving maps_ rather than maps in the example).
From there, the user could continue typing in a normal query or input another backspace (restoring maps) followed by a space to reactivate the CSE.
The existing behavior is already close to how Chromium-based browsers handle custom search engines. Preserving the trailing space would make it consistent and likely more intuitive. The corresponding interaction/behavior in Firefox is substantially different, clearing the entire keyword and space.
Source: philc/vimium