bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14170: 24.3; linum won't create all overlays after a folding


From: Stefan Monnier
Subject: bug#14170: 24.3; linum won't create all overlays after a folding
Date: Mon, 15 Apr 2013 19:00:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> +(defvar margin-side nil)

I suspect you wanted to use nlinum--margin-side instead, right?

>  (defun nlinum--setup-window ()
> -  (set-window-margins nil (if nlinum-mode nlinum--width)
> -                      (cdr (window-margins))))
> +  (cond ((eq bidi-paragraph-direction 'left-to-right)
> +      (set-window-margins nil (if nlinum-mode nlinum--width)
> +                          (cdr (window-margins)))
> +      (setq-local margin-side 'left))
> +     ((eq bidi-paragraph-direction 'right-to-left)
> +      (set-window-margins nil (car (window-margins))
> +                          (if nlinum-mode nlinum--width))
> +      (setq-local margin-side 'right))
> +     (t
> +      (set-window-margins nil
> +                          (if nlinum-mode nlinum--width)
> +                          (if nlinum-mode nlinum--width))
> +      (setq-local margin-side nil))))

Hmm... since the default value of bidi-paragraph-direction is nil, that
means that this will change the default behavior and put a margin in
each side.

Maybe we should decide nlinum--margin-side "lazily" based on the
buffer's content, so if bidi-paragraph-direction is nil we only set
a margin on the sides where we do display line numbers.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]