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: Changes in frame/window code Date: Tue, 29 Jul 2014 12:55:03 +0300 Message-ID: <83zjfsfq14.fsf@gnu.org> References: <53CE6A44.1010708@gmx.at> <53D4FF76.1060804@gmx.at> <8338dmj1of.fsf@gnu.org> <83wqayhe0o.fsf@gnu.org> <53D542B3.20206@gmx.at> <83tx62hane.fsf@gnu.org> <53D6172A.5010909@gmx.at> <83fvhlhad5.fsf@gnu.org> <53D656BB.3010201@gmx.at> <83egx5h86z.fsf@gnu.org> <53D68806.9080101@gmx.at> <838undgxiu.fsf@gnu.org> <53D76758.2030707@gmx.at> <831tt4h58x.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1406627712 22241 80.91.229.3 (29 Jul 2014 09:55:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jul 2014 09:55:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: rudalics@gmx.at Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 11:55:05 2014 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 1XC47b-0006hF-CF for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 11:55:03 +0200 Original-Received: from localhost ([::1]:44461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC47b-0001wF-2O for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 05:55:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC47T-0001vS-Ui for emacs-devel@gnu.org; Tue, 29 Jul 2014 05:55:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC47L-0000PM-H2 for emacs-devel@gnu.org; Tue, 29 Jul 2014 05:54:55 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:59805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC47L-0000PG-8e for emacs-devel@gnu.org; Tue, 29 Jul 2014 05:54:47 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N9G00400WAJVY00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Tue, 29 Jul 2014 12:54:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N9G004YYWV9PH90@a-mtaout21.012.net.il>; Tue, 29 Jul 2014 12:54:45 +0300 (IDT) In-reply-to: <831tt4h58x.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:173241 Archived-At: > Date: Tue, 29 Jul 2014 12:41:02 +0300 > From: Eli Zaretskii > Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org > > > > You need to reverse the meaning of START and END for the R2L case: > > > > > > end = whole - w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); > > > start = end - box_width; > > > > > > (Note that current-bidi-paragraph-direction returns the results at > > > buffer's point, so you will need to temporarily go to the window's > > > point marker.) > > > > As soon as you have some spare time (I know you never do) please try it. > > I can only try this on MS-Windows. Btw, I'm not sure I follow the logic of this snippet: /* The following is needed to ensure that if after maximizing a window we get hscroll > 0, we can still drag the thumb to the left. */ whole = max (whole, w->hscroll + box_width); whole = max (whole, end - start); First, hscroll is in columns, while box_width is in pixels, so adding them sounds incorrect. Second, what problem does this try to solve, and why would this double-maxing solve it? And third, since end - start is exactly equal to box_width, why do you need the second max? What am I missing?