-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm-resume opens helm window in wrong position? #1976
Comments
Confirmed. It also doesn't respect window height set in |
Solved by adding the following to (remove-hook 'helm-after-initialize-hook 'spacemacs//display-helm-at-bottom)
(remove-hook 'helm-cleanup-hook 'spacemacs//restore-previous-display-config)
(defun display-helm-at-bottom (buffer)
(let ((display-buffer-alist (list spacemacs-helm-display-help-buffer-regexp
spacemacs-helm-display-buffer-regexp)))
(helm-default-display-buffer buffer)))
(setq helm-display-function 'display-helm-at-bottom) Spacemacs uses |
@sooheon can you provide a PR for this ? |
Went ahead and implemented @bmag's solution word for word for the PR |
This issue has been solved long time ago by #2081. I verified both on |
Hi, anyone could help me for display helm at bottom without popwin? I am not spacemacs user, But I hope can reuse @bmag 's code. I start emacs with -Q and following config: (require 'helm-config)
(setq helm-mode-fuzzy-match t)
(defvar spacemacs-helm-display-help-buffer-regexp '("*.*Helm.*Help.**"))
(defvar spacemacs-helm-display-buffer-regexp `("*.*helm.**"
(display-buffer-in-side-window)
(inhibit-same-window . nil)
(side . bottom)
(window-width . 0.6)
(window-height . 0.4)))
(defun display-helm-at-bottom (buffer)
(let ((display-buffer-alist (list spacemacs-helm-display-help-buffer-regexp
spacemacs-helm-display-buffer-regexp)))
(helm-default-display-buffer buffer)))
(setq helm-display-function 'display-helm-at-bottom) The problem is: in one window frame, when I start helm-mini, alway became three Following is a screenshot for this case: |
@zw963 replacing |
@bmag, It is worked! thanks. |
this workaround not worked in newest 2.9.4. (2018-05-13) I have to change to following to make it work again: (defun display-helm-at-bottom (buffer &optional _resume)
(let ((display-buffer-alist (list spacemacs-helm-display-help-buffer-regexp
spacemacs-helm-display-buffer-regexp)))
(helm-default-display-buffer buffer))) maybe need more tune to make following is changed code in new version helm: (defun helm-default-display-buffer (buffer &optional _resume)
"Default function to display `helm-buffer' BUFFER.
It is the default value of `helm-display-function'
It uses `switch-to-buffer' or `display-buffer' depending on the
value of `helm-full-frame' or `helm-split-window-default-side'."
(let (pop-up-frames)
(if (or (buffer-local-value 'helm-full-frame (get-buffer buffer))
(and (eq helm-split-window-default-side 'same)
(one-window-p t)))
(progn (and (not (minibufferp helm-current-buffer))
(delete-other-windows))
(switch-to-buffer buffer))
(when (and (or helm-always-two-windows helm-autoresize-mode)
(not (eq helm-split-window-default-side 'same))
(not (minibufferp helm-current-buffer))
(not helm-split-window-inside-p))
(delete-other-windows))
(display-buffer
buffer `(nil . ((window-height . ,helm-display-buffer-default-height)
(window-width . ,helm-display-buffer-default-width))))
(helm-log-run-hook 'helm-window-configuration-hook)))) Thanks |
@zw963 Thank you for the heads up.
@bmag Do we need a fix in Spacemacs ?
"Billy.Zheng" <notifications@github.com> writes:
… this workaround not worked in newest 2.9.4. (2018-05-13)
I have to change to following to make it work again:
```el
(defun display-helm-at-bottom (buffer &optional _resume)
(let ((display-buffer-alist (list spacemacs-helm-display-help-buffer-regexp
spacemacs-helm-display-buffer-regexp)))
(helm-default-display-buffer buffer)))
```
maybe need more tune to make `_resume` work as expect.
following is changed code in new version helm:
```sh
(defun helm-default-display-buffer (buffer &optional _resume)
"Default function to display `helm-buffer' BUFFER.
It is the default value of `helm-display-function'
It uses `switch-to-buffer' or `display-buffer' depending on the
value of `helm-full-frame' or `helm-split-window-default-side'."
(let (pop-up-frames)
(if (or (buffer-local-value 'helm-full-frame (get-buffer buffer))
(and (eq helm-split-window-default-side 'same)
(one-window-p t)))
(progn (and (not (minibufferp helm-current-buffer))
(delete-other-windows))
(switch-to-buffer buffer))
(when (and (or helm-always-two-windows helm-autoresize-mode)
(not (eq helm-split-window-default-side 'same))
(not (minibufferp helm-current-buffer))
(not helm-split-window-inside-p))
(delete-other-windows))
(display-buffer
buffer `(nil . ((window-height . ,helm-display-buffer-default-height)
(window-width . ,helm-display-buffer-default-width))))
(helm-log-run-hook 'helm-window-configuration-hook))))
```
Thanks
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1976 (comment)
|
Steps to reproduce:
helm window opens at the bottom of the screen, as expected
helm window splits the selected window, instead of opening at the bottom of the screen
Can anyone confirm this bug?
In case this isn't just a bug in my configuration, I think we can fix this by setting
helm-display-function
to a custom function, instead of what we currently use to control helm window's display.The text was updated successfully, but these errors were encountered: