[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "... the window start at a meaningless point within a line."
From: |
Alan Mackenzie |
Subject: |
Re: "... the window start at a meaningless point within a line." |
Date: |
Sun, 1 Nov 2015 14:45:55 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, Eli.
On Sun, Nov 01, 2015 at 05:40:15AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 31 Oct 2015 21:17:40 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>
> >
> > pixel-wise resizing isn't a good idea on ttys.
> It isn't supposed to be needed there.
> > > + eassert (WINDOW_LIVE_P (prev_window));
> > > + reseat_at_window_start (&it);
> > > + it.current_x = it.hpos = it.vpos = 0;
> > > + move_it_to (&it, goal_pt, -1, -1, -1, MOVE_TO_POS);
> > > + nlines_prev_window = nlines + it.vpos + 1;
> > > + pw = XWINDOW (prev_window);
> > > + SET_TEXT_POS_FROM_MARKER (pw_top, pw->start);
> > > <=================================
> > > + start_display (&it, pw, pw_top);
> > > + move_it_to (&it, -1, -1, it.last_visible_y - 1, -1, MOVE_TO_Y);
> > > + move_it_by_lines (&it, nlines_prev_window);
> > > + /* Pretend the original move worked as intended. */
> > > + it.vpos = vpos;
> > > + }
> > > +
> > > /* Move to the goal column, if one was specified. If the window
> > > was originally hscrolled, the goal column is interpreted as
> > > an addition to the hscroll amount. */
> >
> > , and it happened because prev_window is 0. Presumably the left hand
> > window on the first frame has no previous. I can't see how the
> > WINDOW_LIVE_P check failed to catch this.
> It is imperative to understand why that test missed, maybe you didn't
> compile with --enable-checking?
I hadn't compiled with --enable-checking.
> Anyway, if this can legitimately happen, i.e. if the exact_start flag
> can be set in the left-side window of the two windows under Follow
> mode, then the WINDOW_LIVE_P test should be in an 'if' test, and the
> following code should be skipped if the test fails.
DONE. This version now doesn't segfault. So I'll go back to your
previous mail to make some more comments.
--
Alan Mackenzie (Nuremberg, Germany).
- Re: "... the window start at a meaningless point within a line.",
Alan Mackenzie <=