From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: "... the window start at a meaningless point within a line." Date: Sun, 1 Nov 2015 14:45:55 +0000 Message-ID: <20151101144555.GC2768@acm.fritz.box> References: <83k2ql4lsy.fsf@gnu.org> <20151018150052.GD1639@acm.fritz.box> <83lhb0hy0h.fsf@gnu.org> <20151019102755.GB2438@acm.fritz.box> <20151027134025.GA2401@acm.fritz.box> <83fv0w41dg.fsf@gnu.org> <20151028131505.GB2538@acm.fritz.box> <8337wryy0x.fsf@gnu.org> <20151031211739.GA1853@acm.fritz.box> <83r3kaxu8w.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1446389075 22972 80.91.229.3 (1 Nov 2015 14:44:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Nov 2015 14:44:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 01 15:44:26 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zstrt-0002vG-TM for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 15:44:26 +0100 Original-Received: from localhost ([::1]:37633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zstrt-0004nn-1O for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 09:44:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zstrg-0004nf-Dc for emacs-devel@gnu.org; Sun, 01 Nov 2015 09:44:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zstrd-0006uB-75 for emacs-devel@gnu.org; Sun, 01 Nov 2015 09:44:12 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:31937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zstrc-0006tA-TF for emacs-devel@gnu.org; Sun, 01 Nov 2015 09:44:09 -0500 Original-Received: (qmail 30262 invoked by uid 3782); 1 Nov 2015 14:44:07 -0000 Original-Received: from acm.muc.de (p548A4E61.dip0.t-ipconnect.de [84.138.78.97]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Nov 2015 15:44:06 +0100 Original-Received: (qmail 3579 invoked by uid 1000); 1 Nov 2015 14:45:55 -0000 Content-Disposition: inline In-Reply-To: <83r3kaxu8w.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193064 Archived-At: 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: emacs-devel@gnu.org > > From: Alan Mackenzie > > > > 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).