[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27281: Fix nlinum missing line numbers.
From: |
npostavs |
Subject: |
bug#27281: Fix nlinum missing line numbers. |
Date: |
Sat, 10 Jun 2017 07:51:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
William Gilbert <gilbertw1@gmail.com> writes:
> I've been working to track to down a bug where line numbers are
> occasionally missing when using nlinum mode. Currently there is a package
> written to workaround the problem that has a picture and description of the
> problem: https://github.com/hlissner/emacs-nlinum-hl.
>
> After extensive debugging I've tracked the problem down to the
> 'nlinum--region' function. Specifically the while loop check that
> determines if '(point)' is less than the limit. I've found that the problem
> exists when '(point)' is exactly equal to 'limit'. In this scenario the
> loop terminates and the last line in the region is not provided with a line
> number.
Do you know how to reproduce this scenario?
> I was able to remedy the problem by changing the condition from
> 'less than' to 'less than or equal to', which will allow the last line in
> the region to be properly assigned a line number.
This sounds like a workaround, possibly to a bug in jit-lock. Or
perhaps we need to return a list of the form (jit-lock-bounds BEG END)
from nlinum--region?