[Top][All Lists]

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

bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll

From: Keith David Bershatsky
Subject: bug#22637: 25.1.50; `mode-line` face `:height` incompatible with `scroll-conservatively 101`.
Date: Mon, 15 Feb 2016 18:00:06 -0800

Thank you, Eli, for the most recent fix implemented in relation to #22637.  
Both of the fixes that you have already implemented do indeed resolve the two 
test cases.

You might be interested to know that the `window-scroll-functions` hook never 
runs after `window-start` is corrected in the following example, so anyone 
seeking to use that hook with a correct `window-start` is out of luck.  In 
addition to the test example below, this type of fact pattern occurs when using 
things such as isearch and ispell (e.g., when programmatically moving to a 
point that is not yet visible).  Attached is an updated 
`window_start_end_hook.diff` that depicts an example of how I have tentatively 
dealt with it for the new hook (but I did not attempt to fix the WSF).

(face-spec-set 'mode-line
'((((class color) (min-colors 88))
   :box (:line-width -1 :style released-button)
   :background "grey75" :foreground "black" :height 120)
   :inverse-video t)))

(setq scroll-conservatively 101)
(global-eldoc-mode -1)
(global-font-lock-mode -1)
(blink-cursor-mode -1)

(defun wsf-test-fn (win start)
  (let* (
      (end (window-end nil t))
      (pos-visible (pos-visible-in-window-p nil win nil)) )
    (message "window-start: %s | window-end: %s | pos-visible: %s"
      start end pos-visible)))

(defun test ()
 (switch-to-buffer (get-buffer-create "*foo*"))
 (add-hook 'window-scroll-functions 'wsf-test-fn nil 'local)
 (setq undo-auto-current-boundary-timer t
        timer-list (delq 'undo-auto--boundary-timer timer-list))
 (dotimes (i 200)
   (insert (format "I will not obey absurd orders %d.\n" i)))
 (goto-char (point-min))
 (goto-char (- (point-max) 1000)))

(global-set-key [f1] 'test)

Attachment: window_start_end_hook.diff
Description: application/diff

reply via email to

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