[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem of released-button style mode-line
From: |
Kenichi Handa |
Subject: |
Re: problem of released-button style mode-line |
Date: |
Tue, 24 Oct 2000 17:24:54 +0900 (JST) |
Miles Bader <address@hidden> writes:
> I've added a new lisp function called `fit-window-to-buffer' (which is
> similar to `shrink-window-if-larger-than-buffer', but slightly
> lower-level), and changed quail to use it. Once there's some function
> to check partial visibility, a hack can be added to fit-window-to-buffer
> to use it.
Thank you. But, I think we need this change because we may
not be in a buffer of WINDOW.
*** window.el.#1.63# Mon Oct 23 08:20:43 2000
--- window.el Tue Oct 24 17:21:04 2000
***************
*** 469,476 ****
;; Don't try to redisplay with the cursor at the end
;; on its own line--that would force a scroll and spoil things.
! (when (and (eobp) (bolp) (not (bobp)))
! (forward-char -1))
(unless (zerop delta)
(if (eq window (selected-window))
--- 469,477 ----
;; Don't try to redisplay with the cursor at the end
;; on its own line--that would force a scroll and spoil things.
! (if (with-current-buffer (window-buffer window)
! (and (eobp) (bolp) (not (bobp))))
! (set-window-point window (1- (window-point window))))
(unless (zerop delta)
(if (eq window (selected-window))
And, I found that you added the new arg FULLY to
pso-visible-in-window-p. I think we can use it at the tail
of fit-window-to-buffer as below:
;; There still is a possibility that the window displays a buffer
;; partially. Try to redisplay the window and enlarge it if the
;; last line is not fully visible.
(let ((positions
(with-current-buffer (window-buffer window)
(cons (point-min)
(save-excursion
(goto-char (point-max))
(if (and (bolp) (not (bobp)))
(1- (point))
(point)))))))
(save-selected-window
(select-window window)
(save-excursion
(goto-char (point-min))
(while (and (< (window-height window) max-height)
(sit-for 0)
(not (pos-visible-in-window-p (cdr positions) window t)))
(enlarge-window 1)))))
The only problem is (sit-for 0). We need it to make
pos-visible-in-window-p return a currect answer, but it
leads to some flickering.
---
Ken'ichi HANDA
address@hidden
- Re: problem of released-button style mode-line, (continued)
Re: problem of released-button style mode-line, Miles Bader, 2000/10/20
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/20
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/20
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/21
- Re: problem of released-button style mode-line,
Kenichi Handa <=
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/24
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/24
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/24
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/24
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/24
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/25
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/25
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/25
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/25
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/26