[oni-ivy] Display posframe in the center of the frame, not window
This commit is contained in:
parent
8bdb2d96ba
commit
4b978ffb75
1 changed files with 7 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0408.103313
|
||||
;; Version: 2021.0712.215209
|
||||
;; Package-Requires: (ivy oni-prescient oni-hydra ivy-hydra diminish ivy-posframe ivy-prescient)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -42,6 +42,10 @@
|
|||
(when ivy-enabled
|
||||
(ivy-mode 1)))))
|
||||
|
||||
(defun ivy-posframe-display-at-frame-bottom-center (str)
|
||||
"Display STR in ivy’s posframe at the bottom centre of the current frame."
|
||||
(ivy-posframe--display str #'posframe-poshandler-frame-bottom-center))
|
||||
|
||||
(when (eq system-type 'windows-nt)
|
||||
(with-eval-after-load 'grep
|
||||
(add-function :around (symbol-function 'grep-read-files)
|
||||
|
@ -50,6 +54,8 @@
|
|||
(global-set-key (kbd "C-<up>") 'ivy-push-view)
|
||||
(global-set-key (kbd "C-<down>") 'ivy-switch-view)
|
||||
|
||||
(setq ivy-posframe-style 'frame-bottom-center)
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'emacs-startup-hook 'ivy-mode)
|
||||
|
||||
|
|
Loading…
Reference in a new issue