]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
emacs: add invisible space after the search widget field in notmuch-hello
[notmuch] / emacs / notmuch-hello.el
index 65fde75a07d3b3ad10179315941c29ab0a26bacb..1a76c30abed9d79eafe1da8c30acc9ad5bf93561 100644 (file)
@@ -462,6 +462,10 @@ Complete list of currently available key bindings:
                                       (length "Search: ")))
                       :action (lambda (widget &rest ignore)
                                 (notmuch-hello-search (widget-value widget))))
+       ;; add an invisible space to make `widget-end-of-line' ignore
+       ;; trailine spaces in the search widget field
+       (widget-insert " ")
+       (put-text-property (1- (point)) (point) 'invisible t)
        (widget-insert "\n")
 
        (when notmuch-hello-recent-searches