diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2011-07-04 10:47:05 +0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-11-12 10:34:53 -0500 |
commit | e972d752c038b015b0af92de4ce1e00aa2557b71 (patch) | |
tree | c03edaeef242eb46ebb03ce680f557da9de90fb1 /emacs/notmuch-hello.el | |
parent | a2d78fba200d0342d90cf27f2ac3eb9091911275 (diff) |
emacs: add invisible space after the search widget field in notmuch-hello
It is very convenient when C-e (bound to `widget-end-of-line') ignores
trailing spaces inside the search widget. But it only does so if a
widget is not followed by a newline (that is why it works in the saved
search widgets). The patch just adds an invisible space after the
search widget to get the desirable behavior of `widget-end-of-line'.
The extra space is also added to expected results of emacs tests.
Diffstat (limited to 'emacs/notmuch-hello.el')
-rw-r--r-- | emacs/notmuch-hello.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75a..1a76c30a 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -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 |