From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Changes in frame/window code Date: Wed, 30 Jul 2014 18:05:09 +0200 Message-ID: <53D917B5.2050604@gmx.at> 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> <83y4vcfoqi.fsf@gnu.org> <53D77BDB.1090500@gmx.at> <83wqawflgj.fsf@gnu.org> <53D7A981.30909@gmx.at> <83lhrctdzr.fsf@gnu.org> <53D7C10C.4010402@gmx.at> <83k36wta5m.fsf@gnu.org> <53D7E6B0.7040504@gmx.at> <83egx4t3nq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406736353 654 80.91.229.3 (30 Jul 2014 16:05:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2014 16:05:53 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 30 18:05:45 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 1XCWNr-0003nT-8e for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2014 18:05:43 +0200 Original-Received: from localhost ([::1]:51952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCWNq-0002ll-RN for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2014 12:05:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCWNf-0002ed-Qm for emacs-devel@gnu.org; Wed, 30 Jul 2014 12:05:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCWNY-0002WV-9r for emacs-devel@gnu.org; Wed, 30 Jul 2014 12:05:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:61499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCWNY-0002WJ-03; Wed, 30 Jul 2014 12:05:24 -0400 Original-Received: from [93.82.11.55] ([93.82.11.55]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MS0c2-1X2BJn2Fsg-00THgE; Wed, 30 Jul 2014 18:05:17 +0200 In-Reply-To: <83egx4t3nq.fsf@gnu.org> X-Provags-ID: V03:K0:X5scpcDciPl2JZjjU43Y/Qydt+/bG+bSPN2rtwmnwgusGcggd9i giiDLulJ5fcwuNiA7e99YAdwje0mZS2nFXLScr9ln/v9c46bghhKp1E0w9JW3VgQwXwDCBT K9K+iYXQZjDKAD8konSwLaj/rwGaxtryKwsSgR/6LFDJS3vAFsUrRQZM7Uo+6jAODZBYfAh hNO1TvupaxSNIEh5FQUxw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.20 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:173281 Archived-At: >> Do you mean that when you click on the slider the value of >> suspend_auto_hscroll is reset? > > No, I mean the slider jumps back to the left edge, whereas it started > at the right edge (which is correct for R2L lines). The following pretty crude version of `scroll-bar-horizontal-drag-1' fixes this here. (defun scroll-bar-horizontal-drag-1 (event) (let* ((start-position (event-start event)) (window (nth 0 start-position)) (portion-whole (nth 2 start-position)) (unit (frame-char-width (window-frame window)))) (if (eq (current-bidi-paragraph-direction) 'left-to-right) (set-window-hscroll window (/ (1- (+ (car portion-whole) unit)) unit)) (set-window-hscroll window (- (window-text-width) (/ (1- (+ (car portion-whole) unit)) unit)))))) martin