
This way, whitespace-only (nonempty) input gets the same treatment of not being added to the history (see previous commit), which seems nice. Part of https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3183. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1442>