unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17813: 24.3.91; bad linum display with `text-scale-adjust'
@ 2014-06-19 17:25 Shigeru Fukaya
  2014-06-19 18:46 ` Stefan Monnier
  2014-07-08 19:33 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Shigeru Fukaya @ 2014-06-19 17:25 UTC (permalink / raw)
  To: 17813

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]


Font size of line numbers by `linum-mode' follow `text-scale-adjust', though
the size of left margin doesn't change.
(nlinum also has the same problem)

The possible solutions are,


(1) To change the width of left margin for line numbers.

[attached patch]


(2) To fix the font size of line numbers.

(set-face-attribute 'linum nil :height (face-attribute 'linum :height nil t))


Solution (2) may need more in case of multi frames with different font size.


Regards,
Shigeru

[-- Attachment #2: linum.diff --]
[-- Type: application/octet-stream, Size: 583 bytes --]

--- orig/linum.el	2014-03-21 14:34:40.000000000 +0900
+++ ./linum.el	2014-06-20 02:13:55.023933400 +0900
@@ -178,6 +178,10 @@ Linum mode is a buffer-local minor mode.
       (let ((inhibit-point-motion-hooks t))
         (forward-line))
       (setq line (1+ line)))
+    (when (and face-remapping-alist (bound-and-true-p linum-mode))
+      (let ((h (cadr (assq :height (assq 'default face-remapping-alist)))))
+	(when (numberp h)
+	  (setq width (ceiling (* width h))))))
     (set-window-margins win width (cdr (window-margins win)))))
 
 (defun linum-after-change (beg end _len)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-08 19:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 17:25 bug#17813: 24.3.91; bad linum display with `text-scale-adjust' Shigeru Fukaya
2014-06-19 18:46 ` Stefan Monnier
2014-06-20  9:30   ` Eli Zaretskii
2014-06-20 13:35     ` Stefan Monnier
2014-06-20 14:27       ` Eli Zaretskii
2014-06-20 15:35         ` Stefan Monnier
2014-07-08 19:33 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).