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: Sat, 17 Oct 2015 17:22:21 +0300 Message-ID: <83k2ql4lsy.fsf@gnu.org> References: <20151001110204.GB2515@acm.fritz.box> <83egheaj9e.fsf@gnu.org> <20151015181642.GA6467@acm.fritz.box> <834mhr99e8.fsf@gnu.org> <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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445091785 28572 80.91.229.3 (17 Oct 2015 14:23:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 14:23:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 17 16:22:56 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 1ZnSNr-0006OP-2x for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 16:22:55 +0200 Original-Received: from localhost ([::1]:58472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSNp-0002PL-SO for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 10:22:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSNO-0002Oa-0v for emacs-devel@gnu.org; Sat, 17 Oct 2015 10:22:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnSNH-0007oj-4K for emacs-devel@gnu.org; Sat, 17 Oct 2015 10:22:22 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:51608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSNG-0007of-T5 for emacs-devel@gnu.org; Sat, 17 Oct 2015 10:22:19 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NWD00300BI5UV00@mtaout27.012.net.il> for emacs-devel@gnu.org; Sat, 17 Oct 2015 17:18:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWD003ZDBQAI600@mtaout27.012.net.il>; Sat, 17 Oct 2015 17:18:11 +0300 (IDT) In-reply-to: <83lhb14o6e.fsf@gnu.org> 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.183 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:191830 Archived-At: > 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?