emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wrong window end reported after splitting window


From: Juanma Barranquero
Subject: Wrong window end reported after splitting window
Date: Sat, 23 Feb 2008 16:50:06 +0100

Using linum.el showcases a bug in Emacs computation of a window's end.
Here's a simple test case from Markus Triska. Just save the code below
to problem.el and run

  emacs -q -l problem.el

The reported window end does not match the real one (as can be easily
determined with what-cursor-position or goto-char).

;;; problem.el starts here ;;;
(defun problem-show-end ()
  (message "Window end of buffer %s: %s"
           (buffer-name) (window-end (selected-window) t)))

(view-emacs-news)
(add-hook 'window-configuration-change-hook 'problem-show-end nil t)
(split-window)
(switch-to-buffer (get-buffer-create "test"))
(enlarge-window (- 8 (window-height)))
;;; problem.el ends here ;;;

             Juanma




reply via email to

[Prev in Thread] Current Thread [Next in Thread]