Permalink
Browse files

* helm.el (helm-display-mode-line): Fix header-line-format.

  • Loading branch information...
thierryvolpiatto committed Apr 6, 2012
1 parent a29740f commit 5a765e6b3c82c595754dec698634051eb7160bf1
Showing with 21 additions and 22 deletions.
  1. +14 −16 helm-plugin.el
  2. +7 −6 helm.el
View
@@ -232,22 +232,20 @@ Will list all lines in .emacs.el.")
(add-to-list 'helm-compile-source-functions 'helm-compile-source--persistent-help)
(defun helm-persistent-help-string ()
- (let ((hs (substitute-command-keys
- (concat "\\<helm-map>\\[helm-execute-persistent-action]: "
- (or (helm-interpret-value (helm-attr 'persistent-help))
- (helm-aif (or (assoc-default
- 'persistent-action
- (helm-get-current-source))
- (assoc-default
- 'action (helm-get-current-source)))
- (cond ((symbolp it)
- (symbol-name it))
- ((listp it)
- (or (ignore-errors (caar it)) ""))))
- "")
- " (keeping session)"))))
- (propertize (concat hs (make-string (- (window-width) (length hs)) ? ))
- 'face 'helm-header)))
+ (substitute-command-keys
+ (concat "\\<helm-map>\\[helm-execute-persistent-action]: "
+ (or (helm-interpret-value (helm-attr 'persistent-help))
+ (helm-aif (or (assoc-default
+ 'persistent-action
+ (helm-get-current-source))
+ (assoc-default
+ 'action (helm-get-current-source)))
+ (cond ((symbolp it)
+ (symbol-name it))
+ ((listp it)
+ (or (ignore-errors (caar it)) ""))))
+ "")
+ " (keeping session)")))
(helm-document-attribute 'persistent-help "persistent-help plug-in"
"A string to explain persistent-action of this source.
View
13 helm.el
@@ -2143,13 +2143,14 @@ It is determined by UNIT and DIRECTION."
(substitute-command-keys (if (listp helm-mode-line-string)
(cadr helm-mode-line-string)
helm-mode-line-string)))
- (setq mode-line-format
- (default-value 'mode-line-format)))
- (setq header-line-format
- `(" " ,(helm-interpret-value
- (assoc-default 'header-line source) source))))
+ (setq mode-line-format (default-value 'mode-line-format)))
+
+ (let* ((hlstr (helm-interpret-value
+ (assoc-default 'header-line source) source))
+ (hlend (make-string (- (window-width) (length hlstr)) ? )))
+ (setq header-line-format
+ (propertize (concat " " hlstr hlend) 'face 'helm-header))))
-
(defun helm-show-candidate-number (&optional name)
"Used to display candidate number in mode-line.
You can specify NAME of candidates e.g \"Buffers\" otherwise

0 comments on commit 5a765e6

Please sign in to comment.