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, 18 Oct 2015 15:00:52 +0000 Message-ID: <20151018150052.GD1639@acm.fritz.box> References: <20151016095535.GA2779@acm.fritz.box> <83a8ri67jg.fsf@gnu.org> <20151016181249.GC2779@acm.fritz.box> <837fmm65bl.fsf@gnu.org> <20151016201238.GD2779@acm.fritz.box> <83twpp51xz.fsf@gnu.org> <20151017115738.GA2522@acm.fritz.box> <83oafx4qsb.fsf@gnu.org> <83lhb14o6e.fsf@gnu.org> <83k2ql4lsy.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 1445180372 19684 80.91.229.3 (18 Oct 2015 14:59:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 14:59:32 +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 Oct 18 16:59:23 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 1ZnpQg-0000Ke-PA for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 16:59:22 +0200 Original-Received: from localhost ([::1]:34227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnpQf-0006q6-Ve for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 10:59:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnpQc-0006pn-9M for emacs-devel@gnu.org; Sun, 18 Oct 2015 10:59:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnpQZ-0002tC-3R for emacs-devel@gnu.org; Sun, 18 Oct 2015 10:59:18 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:61442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnpQY-0002t5-Pv for emacs-devel@gnu.org; Sun, 18 Oct 2015 10:59:15 -0400 Original-Received: (qmail 50169 invoked by uid 3782); 18 Oct 2015 14:59:14 -0000 Original-Received: from acm.muc.de (p548A5AEF.dip0.t-ipconnect.de [84.138.90.239]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 18 Oct 2015 16:59:13 +0200 Original-Received: (qmail 7823 invoked by uid 1000); 18 Oct 2015 15:00:52 -0000 Content-Disposition: inline In-Reply-To: <83k2ql4lsy.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:191953 Archived-At: Hello, Eli. On Sat, Oct 17, 2015 at 05:22:21PM +0300, Eli Zaretskii wrote: > > Date: Sat, 17 Oct 2015 16:31:05 +0300 > > From: Eli Zaretskii > > Cc: emacs-devel@gnu.org > > > > Is the following a correct definition of when Fvertical_motion > > overshoots, i.e. lands one line below (for LINES > 0) the correct one: > > when the offset between the "actual" window-start and the preceding > > "xdisp" BOL is greater than the X coordinate of the last character of > > the 1st physical line in the window. > Another idea: did you try augmenting the X coordinate of the iterator > after it gets back to point at the beginning of Fvertical_motion? > IOW, after this line: > move_it_to (&it, > (!disp_string_at_start_p > || FETCH_BYTE (IT_BYTEPOS (it)) == '\n') > ? PT > : PT - 1, > -1, -1, -1, MOVE_TO_POS); > modify it.current_x such that it's relative to the "actual" > window-start. Then let Fvertical_motion do its job as usual. Did you > try that? No, I haven't. But I don't think it could work. After anchoring `it' at "actual" WS, it would have to move up or down. Any time the iterator is moved to a previous line, it re-anchors itself at a previous _xdisp_ BOL then moves forward, losing the relationship with WS. So this idea might work with nlines > 0, but couldn't work with nlines <= 0. -- Alan Mackenzie (Nuremberg, Germany).