Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add optional args to helm--autoresize-hook (#961).

* helm.el (helm--autoresize-hook): Do it.
commit a717595a73bf75d8d962692868e0fa021d4629f7 1 parent 4d188fe
@thierryvolpiatto thierryvolpiatto authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 helm.el
View
8 helm.el
@@ -5180,12 +5180,14 @@ This happen after `helm-input-idle-delay' secs."
;;; Auto-resize mode
;;
-(defun helm--autoresize-hook ()
+(defun helm--autoresize-hook (&optional max-height min-height)
(with-helm-window
(fit-window-to-buffer nil
- (/ (* (frame-height) helm-autoresize-max-height)
+ (/ (* (frame-height)
+ (or max-height helm-autoresize-max-height))
100)
- (/ (* (frame-height) helm-autoresize-min-height)
+ (/ (* (frame-height)
+ (or min-height helm-autoresize-min-height))
100))))
(define-minor-mode helm-autoresize-mode
Please sign in to comment.
Something went wrong with that request. Please try again.