ace-window.el (aw-copy-window): Copy window-start and point

Fixes #193
Fixes #194
master
ramblehead 6 years ago committed by Oleh Krehel
parent 7003c88cd9
commit c7cb315c14
  1. 10
      ace-window.el

@ -816,10 +816,14 @@ Switch the current window to the previous buffer."
(switch-to-buffer buffer)))
(defun aw-copy-window (window)
"Copy the current buffer to WINDOW."
(let ((buffer (current-buffer)))
"Copy the current buffer to WINDOW - including window-start and point."
(let ((buffer (current-buffer))
(window-start (window-start))
(point (point)))
(aw-switch-to-window window)
(switch-to-buffer buffer)))
(switch-to-buffer buffer)
(set-window-start (frame-selected-window) window-start)
(goto-char point)))
(defun aw-split-window-vert (window)
"Split WINDOW vertically."

Loading…
Cancel
Save