GNU bug report logs -
#57837
29.0.50; fit-window-to-buffer should reposition the buffer
Previous Next
Reported by: sds <at> gnu.org
Date: Thu, 15 Sep 2022 17:32:01 UTC
Severity: normal
Found in version 29.0.50
Full log
View this message in rfc822 format
> Cc: 57837 <at> debbugs.gnu.org
> From: Sam Steingold <sds <at> gnu.org>
> Date: Thu, 15 Sep 2022 18:45:15 -0400
>
> > * Gregory Heytings <tertbel <at> urlgvatf.bet> [2022-09-15 19:34:38 +0000]:
> >
> >>
> >> When the buffer is smaller than the window, move the point to the end
> >> and do `C-x w -` (fit-window-to-buffer).
> >>
> >> The window shrinks, but it is empty - the whole buffer is above.
> >>
> >
> > (advice-add 'fit-window-to-buffer :after
> > (lambda () (and (= (count-lines (point-min) (point-max)) (1- (window-height)))
> > (or (< (point) (point-max)) (forward-line -1) t)
> > (set-window-start nil (point-min)))))
>
> Thank you.
>
> Why shouldn't this be the default behavior?
I thought I explained that it wasn't needed?
This bug report was last modified 2 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.