From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar Date: Thu, 2 Jan 2020 20:19:05 +0100 Message-ID: References: <840ae56c-467b-21f2-7109-bb744897e71b@gmx.at> <83tv5fjgxn.fsf@gnu.org> <8336cyj66m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="176046"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38828@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 02 20:20:29 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1in61F-000jdZ-Fv for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jan 2020 20:20:29 +0100 Original-Received: from localhost ([::1]:44900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1in61E-0008Cl-04 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jan 2020 14:20:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1in60p-0008Br-5b for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 14:20:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1in60o-0000jX-29 for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 14:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1in60n-0000jN-Uz for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 14:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1in60n-0005fE-RU for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2020 14:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2020 19:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38828 X-GNU-PR-Package: emacs Original-Received: via spool by 38828-submit@debbugs.gnu.org id=B38828.157799275421700 (code B ref 38828); Thu, 02 Jan 2020 19:20:01 +0000 Original-Received: (at 38828) by debbugs.gnu.org; 2 Jan 2020 19:19:14 +0000 Original-Received: from localhost ([127.0.0.1]:40040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1in602-0005dw-CF for submit@debbugs.gnu.org; Thu, 02 Jan 2020 14:19:14 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:40757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1in5zz-0005dh-Lx for 38828@debbugs.gnu.org; Thu, 02 Jan 2020 14:19:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577992745; bh=2j9TnogS+TfrJZNN4v7YgqjEpwe0R2WFJ7OU44pLZdc=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ldWvR5C4jVlpN+9pBoPtbbO+XminBvUmW4U3p70YRWyfbxYNw+e5/+qCYwOyJsRH2 ncjaZdMbAhiMzDUI4U1YH0pQ1YeHvB7p41bzM2sGTIv/RaFop+Q+Zt3eLuptW8+29g 0Chs+xnVa2nHvWsLZhhzD6qQ2GkzYBsQfEXQzY4E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.247]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N0oG5-1jhYjt3vfR-00wn6F; Thu, 02 Jan 2020 20:19:05 +0100 In-Reply-To: <8336cyj66m.fsf@gnu.org> Content-Language: de-AT X-Provags-ID: V03:K1:ijpZKtO1gJf8oSuOB50xd4Ss/IXVVhYGOefWynCkJCbKfBDMaUW 5ak3H/fB6jCD9nNQSqo37tLh4XT1KJgk+hvnEU4Rl/CLVD7vm9eOOKOr8y48fPoFOYIOzvn u1HxbkESJWeBovY8DLjC4vUBxpbCdiHJBA6VOGcHZ+6iQeQLrG1gAWxgcYEcMeiYuQ4gooY sitcg7Jz4LaW+EKk3k44A== X-UI-Out-Filterresults: notjunk:1;V03:K0:ereR9hmAyQU=:h5o9AF6km9LrTRO8+eeqKt 41i8ByrZgzg9PRICHrGYllvmwfkDqlfG/VjDVfoUoHq+GMDVP0hvmVRIRbgpBbTAzsytzwdif ypQJ/aGueof5P4HT6+DLsmCDa8mXpcsW2CXA/zCATMTDRC/LnR4qK41k97SBSn+ypV1w9SstK 2+16WR+mPFsveFnWm50qst3VG6dLfB6tT/KSmzZ5f/5TA3qHX0mbWxj2XwU1fc5ko3L/ye0ui uXdO5rmjBgkIIIbKPeriRtXVW5a6P1NcHPsIRXoPvhMqBwKAZUyWtKv3GSAjdnZxeGE7LNDJS DeF38ygCNCfbB2MoSbx4GO60/xI4mq5ebVDsFajZT2K5++twWLrCbIS1S7Mgx3VpVo1dkfpAs LPU5DLWg2e9SBKJoiHQDWnmlHUY4Qkw3/wbEU0KMwCWEnRJwvkjK1uAFnDjoM2JhWwbRxPi6r AMpzMv8EMpfEOo5kee7u3YHvQDoylxjB5ycmYx402/gUAWpwV1AD3jdiIx71+CkrCuKaCeHXM aw3rHg+uImVtKj2U2fIhi8Jdt+OTV5CFQZjOzu6Ybk6Sh6uyQ/N0A/FylmGpVtXcanGrFPQbc R0mzckY/Ng7g7zOdQgrATS89Z9UHi2cAjNjO4UTcmpyddZyw6Xv6uzTs0+hfTMV9dFM6K0pTM uK1u56+flrvBVFpt3sGaxs1YAgvpJAm4VPefVmsuO4riuRa9o6WJ6gOoeJz5i132XWebff5/Y FwFZVwIp5WZBA7nuT5iHYq91rZVMnEjTfVDUBMg5JuoKRnNPWbBZSzbT19cMnuP9WUOUUPp0 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: 209.51.188.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:174076 Archived-At: >> window.c doesn't use it. It's used in xdisp.c only. And I'm sure it >> can return negative values, sometimes. So I presume we can do away >> with it then? > > I think we could. But I'd rather not do that on the emacs-27 branch, > not unless we find situations where it actually causes bugs. Agreed. I'd be more interested anyway in (1) getting the ml_row && ml_row->mode_line_p check into CURRENT_MODE_LINE_HEIGHT (if that makes sense) so we could use CURRENT_MODE_LINE_HEIGHT everywhere (maybe without its embedded assignment) and (2) improve and (remove from there) the && WINDOW_PIXEL_HEIGHT (w) > WINDOW_FRAME_LINE_HEIGHT (w)); check from window_wants_mode_line to use the latest calculated mode line height instead. I'd like to reserve one bit for each window's scroll bars, margins, fringes, mode lines whether they would fit into the window and suppress their display if they don't. This would mean that one can easily shrink a window to some bare minimum, maybe even to zero height/width. > There's more than one problem here (didn't you wonder why pressing F3 > doesn't immediately redraw the mode line?). It never did that unless I changed the size of some window too, so why should I have wondered? > A more thorough patch is > below. It's a pleasant experience now. How expensive is watching a variable? So far I was convinced this would be used for debugging purposes only. > The dispnew.c part is semi-cleanup: it isn't strictly needed > after the changes in window_box_height, although originally that flag > not being reset upon window resizing was exactly the root cause for > the problem after "F2 up". But I don't like the idea of this flag > remaining set, even if no one should be looking at it. Hmm... maybe I > should reset the flag even if we did reallocate current_matrix... What does "resizing a window without allocating new rows" encompass? Is this only shrinking the window height ('shrink-/split-window') or also making a special line like the mode line taller (eating away some of the remaining matrix lines, naively spoken)? martin