summaryrefslogtreecommitdiff
path: root/helm-misc.el
diff options
context:
space:
mode:
authorRussell Sim <russell.sim@gmail.com>2013-09-15 08:41:50 +1000
committerRussell Sim <russell.sim@gmail.com>2013-09-15 08:41:50 +1000
commit0f1272c3c65c21df0f3625ec7c501cfd379b7128 (patch)
treec96fbddf8d067b2d7c3dd07a66f6a98b753c1feb /helm-misc.el
parenta14103cb20b67e22e19a880082250d4800c11cee (diff)
* helm-misc.el: (helm-stumpwm-commands-init) Cleanup whitespace and sort.
Diffstat (limited to 'helm-misc.el')
-rw-r--r--helm-misc.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/helm-misc.el b/helm-misc.el
index acef8294..ebb736f8 100644
--- a/helm-misc.el
+++ b/helm-misc.el
@@ -275,8 +275,10 @@ It is added to `extended-command-history'.
(with-current-buffer (helm-candidate-buffer 'global)
(save-excursion
(call-process "stumpish" nil (current-buffer) nil "commands"))
- (while (re-search-forward "\\([^ ]+\\) \n?" nil t)
- (replace-match "\\1\n"))
+ (while (re-search-forward "[ ]*\\([^ ]+\\)[ ]*\n?" nil t)
+ (replace-match "\n\\1\n"))
+ (delete-blank-lines)
+ (sort-lines nil (point-min) (point-max))
(goto-char (point-max))))
(defun helm-stumpwm-commands-execute (candidate)