Remove redraw calls; disruptive on Arch

This commit is contained in:
Henrik Lissner 2016-10-10 01:23:14 +02:00
parent ff191869d7
commit ce27e6fa5f
2 changed files with 6 additions and 13 deletions

View file

@ -20,8 +20,6 @@
"C-u" 'backward-kill-sentence "C-u" 'backward-kill-sentence
"C-b" 'backward-word "C-b" 'backward-word
"C-f" 'forward-word) "C-f" 'forward-word)
;; Fix display glitches
(advice-add 'ivy-done :after 'redraw-display)
(after! magit (setq magit-completing-read-function 'ivy-completing-read)) (after! magit (setq magit-completing-read-function 'ivy-completing-read))
(after! smex (setq smex-completion-method 'ivy)) (after! smex (setq smex-completion-method 'ivy))

View file

@ -70,7 +70,7 @@ window. Returns nil or the popup window."
nil (or plist (shackle-match buffer-name))))) nil (or plist (shackle-match buffer-name)))))
;;;###autoload ;;;###autoload
(defun doom/popup-close (&optional window dont-kill dont-redraw) (defun doom/popup-close (&optional window dont-kill)
"Find and close the currently active popup (if available)." "Find and close the currently active popup (if available)."
(interactive) (interactive)
(setq window (or window (selected-window))) (setq window (or window (selected-window)))
@ -85,8 +85,7 @@ window. Returns nil or the popup window."
kill-buffer-query-functions))) kill-buffer-query-functions)))
(kill-buffer (window-buffer window))) (kill-buffer (window-buffer window)))
(doom-popup-mode -1))) (doom-popup-mode -1)))
(delete-window window) (delete-window window)))
(unless dont-redraw (redraw-frame))))
;;;###autoload ;;;###autoload
(defun doom/popup-close-maybe () (defun doom/popup-close-maybe ()
@ -98,17 +97,13 @@ window. Returns nil or the popup window."
(doom/popup-close))) (doom/popup-close)))
;;;###autoload ;;;###autoload
(defun doom/popup-close-all (&optional dont-kill dont-redraw) (defun doom/popup-close-all (&optional dont-kill)
"Closes all popups (kill them if DONT-KILL-BUFFERS is non-nil). Then redraw "Closes all popups (kill them if DONT-KILL-BUFFERS is non-nil)."
the display (unless DONT-REDRAW is non-nil)."
(interactive) (interactive)
(let ((orig-win (selected-window))) (let ((orig-win (selected-window)))
(mapc (lambda (w) (doom/popup-close w dont-kill t)) (mapc (lambda (w) (doom/popup-close w dont-kill t))
(--filter (and (doom/popup-p it) (not (eq it orig-win))) (window-list)))) (--filter (and (doom/popup-p it) (not (eq it orig-win)))
;; Earlier versions of Emacs were more prone to graphical artifacts, so redraw (window-list)))))
;; the frame in them.
(when (< emacs-major-version 25)
(unless dont-redraw (redraw-frame))))
;;;###autoload ;;;###autoload
(defun doom/popup-last-buffer () (defun doom/popup-last-buffer ()