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 16:31:05 +0300 Message-ID: <83lhb14o6e.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445088682 16582 80.91.229.3 (17 Oct 2015 13:31:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 13:31:22 +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 15:31:13 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 1ZnRZp-0003tJ-81 for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 15:31:13 +0200 Original-Received: from localhost ([::1]:58335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnRZo-00038p-AN for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 09:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnRZj-00038Z-Um for emacs-devel@gnu.org; Sat, 17 Oct 2015 09:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnRZg-0000xt-N2 for emacs-devel@gnu.org; Sat, 17 Oct 2015 09:31:07 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:60593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnRZg-0000xp-Fm for emacs-devel@gnu.org; Sat, 17 Oct 2015 09:31:04 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NWD00A0090U2A00@mtaout25.012.net.il> for emacs-devel@gnu.org; Sat, 17 Oct 2015 16:28:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWD005HQ9FP2050@mtaout25.012.net.il>; Sat, 17 Oct 2015 16:28:39 +0300 (IDT) In-reply-to: <83oafx4qsb.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.181 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:191825 Archived-At: > Date: Sat, 17 Oct 2015 15:34:44 +0300 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > So now I think that the problem can be solved as follows: > > . if Fvertical_motion's code without changes ends up before the > first newline that follows the window-start, you don't need to do > anything, because Fvertical_motion does exactly what you want in > that case > > . otherwise Fvertical_motion will either end up on the screen line > before the goal, or will be on the right screen line, but to the > right of the goal column, and a correction should be applied by > moving point to the left 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.