[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56393: Actually fix the long lines display bug
From: |
Eli Zaretskii |
Subject: |
bug#56393: Actually fix the long lines display bug |
Date: |
Thu, 07 Jul 2022 17:10:01 +0300 |
> Cc: gregory@heytings.org, larsi@gnus.org, 56393@debbugs.gnu.org
> Date: Thu, 07 Jul 2022 16:36:38 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > modified src/xdisp.c
> > @@ -18872,11 +18872,20 @@ set_vertical_scroll_bar (struct window *w)
> > && NILP (echo_area_buffer[0])))
> > {
> > struct buffer *buf = XBUFFER (w->contents);
> > - whole = BUF_ZV (buf) - BUF_BEGV (buf);
> > - start = marker_position (w->start) - BUF_BEGV (buf);
> > - /* I don't think this is guaranteed to be right. For the
> > - moment, we'll pretend it is. */
> > - end = BUF_Z (buf) - w->window_end_pos - BUF_BEGV (buf);
> > + if (! BUFFER_AUTO_NARROWED_P (buf))
> > + {
> > + whole = BUF_ZV (buf) - BUF_BEGV (buf);
> > + start = marker_position (w->start) - BUF_BEGV (buf);
> > + /* I don't think this is guaranteed to be right. For the
> > + moment, we'll pretend it is. */
> > + end = BUF_Z (buf) - w->window_end_pos - BUF_BEGV (buf);
> >
> > I can almost guarantee that it's not guaranteed that window_end_pos is
> > always right. But I don't have an alternative, ATM. Could you please
> > add a TODO or what's customary today in the comment, so it's easier to
> > find?
>
> Yes, this should test window_end_valid before using window_end_pos.
> An alternative could be window-start point plus some estimation of the
> window's text, perhaps?
Actually, we could be more accurate: we could use move_it_to,
similarly to what pos_visible_p does when passed -1 as the position.
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Po Lu, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Lars Ingebrigtsen, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Gerd Möllmann, 2022/07/05
- bug#56393: Actually fix the long lines display bug, Gerd Möllmann, 2022/07/07
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/07
- bug#56393: Actually fix the long lines display bug,
Eli Zaretskii <=
- bug#56393: Actually fix the long lines display bug, Gerd Möllmann, 2022/07/08
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/08
- bug#56393: Actually fix the long lines display bug, Gerd Möllmann, 2022/07/08
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/08
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/09
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/09
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/09
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/09
- bug#56393: Actually fix the long lines display bug, Gregory Heytings, 2022/07/09
- bug#56393: Actually fix the long lines display bug, Eli Zaretskii, 2022/07/09