From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "... the window start at a meaningless point within a line." Date: Sun, 01 Nov 2015 05:40:15 +0200 Message-ID: <83r3kaxu8w.fsf@gnu.org> References: <83oafx4qsb.fsf@gnu.org> <83lhb14o6e.fsf@gnu.org> <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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446349296 12331 80.91.229.3 (1 Nov 2015 03:41:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Nov 2015 03:41:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 01 04:41:27 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 1ZsjWI-0003tF-E9 for ged-emacs-devel@m.gmane.org; Sun, 01 Nov 2015 04:41:26 +0100 Original-Received: from localhost ([::1]:57788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsjWH-0000Rg-Gq for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2015 23:41:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsjWF-0000Rb-0P for emacs-devel@gnu.org; Sat, 31 Oct 2015 23:41:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsjWB-0004ck-Pg for emacs-devel@gnu.org; Sat, 31 Oct 2015 23:41:22 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:59294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsjWB-0004cZ-IG for emacs-devel@gnu.org; Sat, 31 Oct 2015 23:41:19 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NX400I009XZT000@mtaout26.012.net.il> for emacs-devel@gnu.org; Sun, 01 Nov 2015 05:43:37 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX400HLPACPK720@mtaout26.012.net.il>; Sun, 01 Nov 2015 05:43:37 +0200 (IST) In-reply-to: <20151031211739.GA1853@acm.fritz.box> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 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:193049 Archived-At: > 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? 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.