Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created October 25, 2012 18:42
Show Gist options
  • Select an option

  • Save jorgenschaefer/3954596 to your computer and use it in GitHub Desktop.

Select an option

Save jorgenschaefer/3954596 to your computer and use it in GitHub Desktop.
(defun lui-scroll-window (window display-start)
"Scroll the input line to the bottom of the WINDOW.
DISPLAY-START is passed by the hook `window-scroll-functions' and
is ignored.
See `lui-scroll-behavior' for how to customize this."
(when (and (eq lui-scroll-behavior 'post-scroll)
window
(window-live-p window))
(with-selected-window window
(when (or (>= (point) lui-input-marker)
(pos-visible-in-window-p (point-max) window))
(let ((resize-mini-windows nil))
(save-excursion
(goto-char (point-max))
(recenter -1)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment