[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17906: 24.3; nlinum 1.4 error: OpenStep is not in use or not initial
From: |
Stefan Monnier |
Subject: |
bug#17906: 24.3; nlinum 1.4 error: OpenStep is not in use or not initialized |
Date: |
Wed, 02 Jul 2014 22:14:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> (require 'nlinum)
> (global-nlinum-mode)
> The bug does not occur in windowed (GUI) mode, but appears quite
> visciously in ncurses (CLI) mode.
Indeed, sorry. I just pushed the patch below which should appear in
nlinum-1.5 tomorrow and seems to fix the problem.
Stefan
diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el
index 8719e92..82e274c 100644
--- a/packages/nlinum/nlinum.el
+++ b/packages/nlinum/nlinum.el
@@ -72,12 +72,14 @@ Linum mode is a buffer-local minor mode."
(aref (font-info (face-font face)) 2))
(defun nlinum--setup-window ()
- (let ((width (ceiling
- ;; We'd really want to check the widths rather than the
- ;; heights, but it's a start.
- (/ (* nlinum--width 1.0
- (nlinum--face-height 'linum))
- (frame-char-height)))))
+ (let ((width (if (display-graphic-p)
+ (ceiling
+ ;; We'd really want to check the widths rather than the
+ ;; heights, but it's a start.
+ (/ (* nlinum--width 1.0
+ (nlinum--face-height 'linum))
+ (frame-char-height)))
+ nlinum--width)))
(set-window-margins nil (if nlinum-mode width)
(cdr (window-margins)))))