[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer
From: |
Eli Zaretskii |
Subject: |
bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer |
Date: |
Fri, 16 Sep 2022 08:45:57 +0300 |
> Cc: 57837@debbugs.gnu.org
> From: Sam Steingold <sds@gnu.org>
> Date: Thu, 15 Sep 2022 18:45:15 -0400
>
> > * Gregory Heytings <tertbel@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?
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, (continued)
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Sam Steingold, 2022/09/15
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Gregory Heytings, 2022/09/15
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Sam Steingold, 2022/09/16
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Gregory Heytings, 2022/09/16
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Sam Steingold, 2022/09/16
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Gregory Heytings, 2022/09/16
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Eli Zaretskii, 2022/09/17
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Gregory Heytings, 2022/09/17
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Eli Zaretskii, 2022/09/17
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer, Gregory Heytings, 2022/09/18
- bug#57837: 29.0.50; fit-window-to-buffer should reposition the buffer,
Eli Zaretskii <=