mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
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.
This commit is contained in:
parent
a2d78fba20
commit
e972d752c0
4 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -4,7 +4,7 @@ Saved searches: [edit]
|
|||
|
||||
50 inbox 50 unread
|
||||
|
||||
Search:
|
||||
Search:
|
||||
|
||||
[Show all tags]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Welcome to notmuch. You have 50 messages.
|
||||
|
||||
Search:
|
||||
Search:
|
||||
|
||||
[Show all tags]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Saved searches: [edit]
|
|||
|
||||
50 inbox 50 unread 0 empty
|
||||
|
||||
Search:
|
||||
Search:
|
||||
|
||||
[Show all tags]
|
||||
|
||||
|
|
Loading…
Reference in a new issue