Permalink
Browse files

* helm.el (helm-delete-current-selection): Fix when deleting last elm…

…t of a source.
  • Loading branch information...
1 parent baa3f23 commit 15527e83aef93a2a7595e51b5f6c18f68460561e @thierryvolpiatto thierryvolpiatto committed Nov 29, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 helm.el
View
@@ -2784,8 +2784,13 @@ to a list of forms.\n\n")
(forward-line 1)))
(t
(delete-region (point-at-bol) (1+ (point-at-eol)))
- (when (helm-end-of-source-p) (forward-line -1))))
- (helm-mark-current-line)))
+ (when (helm-end-of-source-p)
+ (let ((headp (save-excursion
+ (forward-line -1)
+ (not (helm-pos-header-line-p)))))
+ (and headp (forward-line -1))))))
+ (unless (eq (point-at-bol) (point-at-eol))
+ (helm-mark-current-line))))
(defun helm-end-of-source-p ()
"Return non--nil if we are at eob or end of source."

0 comments on commit 15527e8

Please sign in to comment.