From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Line height issues with display-line-number-mode Date: Wed, 8 May 2019 14:39:42 -0400 Message-ID: References: <6fd496f0-7dd5-6c0e-5121-b618e7dca831@gmail.com> <83sgtqi02k.fsf@gnu.org> <83r29ahyz2.fsf@gnu.org> <83pnouhwxs.fsf@gnu.org> <83ef59igzc.fsf@gnu.org> <83tve5ghyd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116399"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 08 20:40:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hORU8-000UAe-88 for ged-emacs-devel@m.gmane.org; Wed, 08 May 2019 20:40:08 +0200 Original-Received: from localhost ([127.0.0.1]:41597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hORU7-0005Kz-7c for ged-emacs-devel@m.gmane.org; Wed, 08 May 2019 14:40:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hORTx-0005JT-W7 for emacs-devel@gnu.org; Wed, 08 May 2019 14:39:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hORTx-0001hr-44 for emacs-devel@gnu.org; Wed, 08 May 2019 14:39:57 -0400 Original-Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]:35500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hORTv-0001hA-MY; Wed, 08 May 2019 14:39:55 -0400 Original-Received: by mail-ot1-x32d.google.com with SMTP id g24so19291885otq.2; Wed, 08 May 2019 11:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0pMoEH5uJGftyhFVAU+ISXKIUsZI+QT3D2/AQJXIEZU=; b=u/+zcVUUjnobq24YibYOSyo0n9YQMsWObR1GN2MNLPWC4GhA4CqZIk0zSpk6TlrKDQ 2aP8kdQzVz+OjZPQpuWMJ0so6Bq8e7ofpIry8h/2or9cpydk2M5LTu/IFF7wDI0Xg3Vx M7ImwcareKblcTYj3f+GBWkMbkZcZya7Sbv4dyVZIo9MTxUpPmLGvCLxmKqTInVe3PVJ woPUyhwqAyLRowUEn2Q1GVQI3zrQP5+B/4X7RGdrZcsGjBmtZKxl8Jr8DdK4I5fhS0rF q0+Yyb/ZDvu6SUIUKh3/HETmTPqL8NQnZxpuaUEUHJAKagxps52yYBR/NE3biWtQWe0L N6Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0pMoEH5uJGftyhFVAU+ISXKIUsZI+QT3D2/AQJXIEZU=; b=H7z2DLtrvufY6n6OBniaOUxCeHasDLP2g/5RzhDGubdMG8IS0cFzp4UDpPyWe7m9SA OvpLvchueOhd3abRTsTwRtCg3Lj+RtphJXfEn/D021xwPEhQ8OaUfaZCISpoeREaIGdh CnuB1ucQTvvwvFndebIyHiJL7EN1HoCNKBuZTzb8l8uVRBRPsZY3w7pfgGb0nLIQplzK 2ZGzdmocwW+vb1BBkr1c9I7vZuyEWskFWjl/w0rlx6BGblnLfpQ1YbQGB9miLqKqw3Az 1RBME94OvJquGbw7qrAIoFM97lCeJ27kpHoGpUwa0KGMrnU3m55xA1tYwmg43J56EsMe rxmA== X-Gm-Message-State: APjAAAU6xru+L4b7bNBCkC7DsBjDbO2lab9XAxnXgpBRZmNUdHPgdSOy C6hdRhPHVjJcJ0i5Pvxj6V0pzhyyoNf3c1vhyrfKMXzI X-Google-Smtp-Source: APXvYqwUUedRjW7z3V5TR+ujet5PGGgc6YnHG++18WGRQXf7zXZO+mWuxRYBpdlPJaOUEiRV0kyLvefdPtrhmxV2PHk= X-Received: by 2002:a9d:7443:: with SMTP id p3mr10807961otk.72.1557340794656; Wed, 08 May 2019 11:39:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32d 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:236307 Archived-At: On Wed, 8 May 2019 at 11:04, Stefan Monnier wrote: > > --- i/lisp/help-fns.el > > +++ w/lisp/help-fns.el > > @@ -1257,7 +1257,17 @@ describe-symbol > > (progn (skip-chars-backward " \t\n") (point))) > > (insert "\n\n" > > (eval-when-compile > > - (propertize "\n" 'face '(:height 0.1 :inverse-video t))) > > + (propertize > > + "\n" 'face '(:underline t) > > + 'display `(space > > + :align-to > > + (+ (0 . right) > > + ,(min (window-hscroll) > > + (- (line-end-position) > > + (line-beginning-position))))) > > + ;; This prevents the cursor from being rendered at the > > + ;; edge of the window. > > + 'cursor t)) > > That align-to computation looks brittle (and still incorrect, I think) > and it hardcodes into the text-property a value which can change later > (window-hscroll), so it's rather problematic. Yes, in magit this is recomputed from redisplay-highlight-region-function, which keeps the value up to date, but has it's own problems (e.g., inf looping in redisplay Bug#24633, this is what `min' works around). I guess for *Help* buffers there's not much use in hscrolling, so using just '(space :align-to right) would be fine.