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 10:13:36 -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="245394"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 08 16:14:34 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 1hONL7-0011i5-6U for ged-emacs-devel@m.gmane.org; Wed, 08 May 2019 16:14:33 +0200 Original-Received: from localhost ([127.0.0.1]:37948 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hONL6-0006GF-3N for ged-emacs-devel@m.gmane.org; Wed, 08 May 2019 10:14:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hONKR-0006Fv-Cp for emacs-devel@gnu.org; Wed, 08 May 2019 10:13:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hONKQ-00015Y-Fw for emacs-devel@gnu.org; Wed, 08 May 2019 10:13:51 -0400 Original-Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]:36150) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hONKP-00014S-2V; Wed, 08 May 2019 10:13:49 -0400 Original-Received: by mail-oi1-x232.google.com with SMTP id l203so15256512oia.3; Wed, 08 May 2019 07:13:49 -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=gFfNxhVTrAFZ/LSttd8OcujFkehlJNsUYG9f9X6R4yQ=; b=P16j0Bk9k05le2LhLu3tHZZei3E6+PxNszi1hb/bOpuFs9LcYREN7m2jLZDCWbn8Oc a6W59DYMty3ndkanPqnFuV/p1xg3v1wsi5HI92E4neXvmTARwp1m/dg49TCkbmM3ZBTf o2n6E2Pl9H4igZUKxA6P7CV1PhmX5f0+rXP+j9w77KWv8q2ZuOBffdolNEgRkfuNThM5 2Jh3WVzA1ppixmd0q7jU8yvIVyQfZcYRlw98uk1azPogSXdoRKqw2FvpAC8kPUN4fZ7P 5msJz+gyFgei9MwHounsFw4ZgwDbh5iNsZFRaaaYUUJd6UMuhgP8T05F3u8eynJoLonZ HMng== 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=gFfNxhVTrAFZ/LSttd8OcujFkehlJNsUYG9f9X6R4yQ=; b=qfHCPrXu7OBJMK/uzAKIPksnKd6nJ/8ENcb4Cns+98IwpjWTo9pxOY1Xg/lO7mLTfP 9kh4O2CqMApRwTNTbIah46s0LnL87Zl7r1DeTLCOHG3j6P/0S2D/V/WR6ENqqea1auxu bT6tEBwHvyu+xsIG2Std4FjcF1WvwddvevL1WJtcq+N/rUs+1uxEJ+g6ZbB6qHuhKwyB ZKWpc3EeWjQB+nbtQ2yLBaWO+pBlzMMLxb6XxhTTVe/J8KCSrOnsh5LKvSnyR5aejoc9 VxgWn1lYh1kVVgSEcp5OJhfsnC4a7BMxDebPxam8h7AkxY97Ms07ITyNY3PQ4IP5xs+U UW5Q== X-Gm-Message-State: APjAAAUHfrDw7D6uEyoaUOMxIDLQgyWPI4Rlhqua5sLFr6qoCjpe8Dmy PPov1pGIAWs++2/5mpqZ3OjNuPyF7xKbqNilofcaHI/u X-Google-Smtp-Source: APXvYqzNYvVNE3QPlzLKikop4UV43Z70abiXtU3ytNFYWJ2NlKrbVucKKH6CHMf60kRubQifY17ebPudkj17T1Q88Ug= X-Received: by 2002:a54:4f18:: with SMTP id e24mr2262530oiy.87.1557324828004; Wed, 08 May 2019 07:13:48 -0700 (PDT) In-Reply-To: <83tve5ghyd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::232 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:236292 Archived-At: On Wed, 8 May 2019 at 10:06, Eli Zaretskii wrote: > > > From: Stefan Monnier > > Cc: emacs-devel@gnu.org > > Date: Wed, 08 May 2019 09:39:58 -0400 > > > > > Btw, any reasons (other than "because we can") why we use these > > > tricks, instead of actually producing an underline? > > > > Not sure what "producing an underline" means concretely. > > Using the 'underline' face, obviously. We tried this in magit, getting the line to extend to the edge of the window is not so obvious. But we did get something working in the end. Here it is as a patch against describe-symbol: --- 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)) "\n") (when name (insert (symbol-name symbol)