From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Calculating screen relative X when horizontal scrolling. Date: Fri, 19 Oct 2018 13:02:00 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1539979247 1846 195.159.176.226 (19 Oct 2018 20:00:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2018 20:00:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 19 22:00:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDaws-0000OH-56 for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2018 22:00:42 +0200 Original-Received: from localhost ([::1]:52472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDayy-0000sk-Nr for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2018 16:02:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDayl-0000hh-El for emacs-devel@gnu.org; Fri, 19 Oct 2018 16:02:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDaye-00021k-JS for emacs-devel@gnu.org; Fri, 19 Oct 2018 16:02:38 -0400 Original-Received: from gateway22.websitewelcome.com ([192.185.46.229]:21904) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gDayN-0001t8-Ka for emacs-devel@gnu.org; Fri, 19 Oct 2018 16:02:21 -0400 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 45ED1A3EC for ; Fri, 19 Oct 2018 15:02:13 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Day9gJvB8tz4jDayFgR1HV; Fri, 19 Oct 2018 15:02:12 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Cc :To:From:Message-ID:Date:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BwLbtxvHh1yedzf3gQWCu97u4jlooyuTfLda+iikBeI=; b=STa/4brPCdi8W/yVTnvICtzofl MsnLGQt8Y8qQ/NIlFVaUi/YbTiuctXplD/jQ8B+fQBwezQ/yg1FW4xHgeaNUCCBHWC6OGkjzmP/lQ 2G47kmhbh+2DXj5aJhuE86fizqx+ODk35at21S30HljSplfFcUjnMzJy62+BUD1OT9zr2AlHqaRvb Rt/Wwe269NHi8boHuThSDsFWtM16St23Rw6LMiOtcbkPjl76j8lGNpaeC7W0SuGfqL/QQWAI23f32 r4N5dml+L/mExB0PciuquVJtgQUX84AtnELyp5CzVq/hHIuuTdmgipFY0tymEyhT9gjH3vCbYKI4o J4omcigw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51851 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1gDay8-000NEV-VK; Fri, 19 Oct 2018 15:02:01 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1gDay8-000NEV-VK X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:51851 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.46.229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230511 Archived-At: Amendment to prior email ... Instead of: "The first character '=E3=81=AE' which was at a relative_x o= f 55 in a (scroll-left 9) situation, is still at a relative_x of 55 in a = (scroll-left 10) situation". I should have said: "The first character '=E3=81=AE' which was at a rela= tive_x of 44 in a (scroll-left 9) situation, is still at a relative_x of = 44 in a (scroll-left 10) situation". ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [10-19-2018 12:23:34] <19 Oct 2018 22:23:34 +0300> > From: Eli Zaretskii > To: Keith David Bershatsky > CC: emacs-devel@gnu.org > Subject: Re: Calculating screen relative X when horizontal scrolling. >=20 > > Date: Wed, 17 Oct 2018 13:43:49 -0700 > > From: Keith David Bershatsky > > Cc: emacs-devel@gnu.org > > > > relative_x =3D it->current_x - ((window_hscroll_limited (it->w, it->f= ) * FRAME_COLUMN_WIDTH (it->f)) >=20 > Can you tell why you don't use the simple approach: >=20 > relative_x =3D it->current_x - it->first_visible_x; >=20 > ?