From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#28605: 26.0.60; Part of leftmost character hidden Date: Thu, 05 Oct 2017 14:46:11 +0200 Message-ID: <87a815lq3w.fsf@gmail.com> References: <59CB5D69.7040404@gmx.at> <59CE05F2.1010202@gmx.at> <59CE8E74.5010308@gmx.at> <59D35549.6030905@gmx.at> <87wp4c750c.fsf@gmail.com> <59D4A45F.5010606@gmx.at> <87tvzfjfcp.fsf@gmail.com> <59D5E8F6.8080002@gmx.at> <87efqikk0x.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507207639 25246 195.159.176.226 (5 Oct 2017 12:47:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 12:47:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: Ola Nilsson , Lars Magne Ingebrigtsen , 28605@debbugs.gnu.org, Kaushal To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 05 14:47:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1e05YS-00054i-Lk for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Oct 2017 14:47:08 +0200 Original-Received: from localhost ([::1]:39693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e05YZ-0007WE-Ue for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Oct 2017 08:47:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e05YR-0007U4-Vp for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2017 08:47:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e05YM-0003S1-2q for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2017 08:47:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e05YL-0003Ri-VV for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2017 08:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e05YL-0006t0-LY for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2017 08:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Oct 2017 12:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28605-submit@debbugs.gnu.org id=B28605.150720758126416 (code B ref 28605); Thu, 05 Oct 2017 12:47:01 +0000 Original-Received: (at 28605) by debbugs.gnu.org; 5 Oct 2017 12:46:21 +0000 Original-Received: from localhost ([127.0.0.1]:49868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e05Xh-0006rz-0K for submit@debbugs.gnu.org; Thu, 05 Oct 2017 08:46:21 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:53355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e05Xe-0006rj-Ut for 28605@debbugs.gnu.org; Thu, 05 Oct 2017 08:46:19 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id q132so1970322wmd.2 for <28605@debbugs.gnu.org>; Thu, 05 Oct 2017 05:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0d6Tv3B6LDJqa3L/y5TvxuAcJ+7w3pbv06SK6f13e0c=; b=k+FbtRT6BrF3k+uZwCExDLXHXg1s/30LwTNFMfoadR+8Qn4uegPwJ2VCS5JvvpJA7j oFhukYaUFCJQlWvvslNRnCfzrXhGZo1HFcSw+ZYBn1BEQaJ4IGHP0DcxF8aet/uwmTHW DcbPNRaYoRFBQ4Db+BYLcx0uqNhI6Hg4B/pv/Pe9LSWRPvnPPTWCbWlb8vpQvMxg2d74 sIqNcK0NQelOuo+KxVSjIJ8hyYhdBJSy3F55XULZje83vN1p3q0dcxGIyY+sIVSVKVlC LAyjGwboWhZKbBUWNDuC9NEV1VUh8SgRenykYJ+ipW4gQjyXV0HWDrTYttFtlT2YSwxg pyOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=0d6Tv3B6LDJqa3L/y5TvxuAcJ+7w3pbv06SK6f13e0c=; b=ocSEcb6FXQe3/awKlDuVR3zF4FXnzklds+gPZq0YlRrliHnh/hEr+NKOnxMXdIom+4 OYPzWyc8IC66WBauao/zb2/HSwsPFVHbKoNhxTYpEQlQfpSErUsUsoDda/8CBwmmO0gb STTRQ471WMz3RyrJj1v1/133NVH8a6C07riQaRielWpEkY51WqeyBD4ZH8oDxu/NxReZ KQu+WLqXnRNrhIfuPNrV5OBt/7n/6udM8rym+SWaPRDLuOhPeFjtLGlItSNVF6WTWsr9 KdTsUQ5zTcvpKDIcivXF6BEEtfN6i1VR53TetGRThewIrDp7LS0ayCDQoBQNPVpeKCOm 9n1A== X-Gm-Message-State: AHPjjUjDLrwESNwIXDV8LEysv49DYUMfMw901gfBaKyrLWcMxYVDNZSp ako37al67bJ7KRMFoWSwbRQ= X-Google-Smtp-Source: AOwi7QD1fIQabGKkQPsPI6Qfw6eT9XG+Ul2hqPbn83/YLOKHnPfIBsqwbzMaGq1NpFe43Vglu9joDA== X-Received: by 10.80.208.130 with SMTP id v2mr31279650edd.62.1507207573086; Thu, 05 Oct 2017 05:46:13 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id d3sm14205930edd.41.2017.10.05.05.46.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Oct 2017 05:46:12 -0700 (PDT) In-Reply-To: <87efqikk0x.fsf@gmail.com> (Robert Pluim's message of "Thu, 05 Oct 2017 11:42:54 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137965 Archived-At: Robert Pluim writes: > The horizontal fix is somewhat cargo-culted from the vertical case, > so I'm not 100% sure that this hunk is correct (why is it only > adjusting the width and the x position? Should it adjust the height/y > for the horizontal case?): > > + { > + /* Clear under old scroll bar position. */ > + oldw += (scale - 1) * oldw; > + oldx -= (scale - 1) * oldw; > + x_clear_area (f, oldx, oldy, oldw, oldh); > + } Thinking about this some more, this whole calculation just looks wrong. oldx, oldw, oldw and oldh are in unscaled pixels, as far as I can tell. We need to scale when using GTK routines, but x_clear_area ends up calling X11 routines, so I've almost convinced myself that we should in fact delete the oldw and oldx adjustments for the vertical scrollbar rather than adding them for the horizontal one. That code was added in commit c0055ff5b03c9121ab5bf752496b09416f0f0a7d which is quite old, I suspect it did no real harm even though oldx tends to end up negative, possibly x_clear_area does some kind of clipping. Robert