The reason I've noticed/reported this bug was because I was working on a mode with a similar implementation to linum's, and got the same behavior. This is not a linum bug.

On a side note, I would prefer nlinum's approach for my package, but if I'm correct it would become slower over time, as it doesn't "GC" overlays. And I don't think jit-lock provides an easy method to do it, as it marks regions "fontified" (as opposed to "fontified-by-X-function"). 

Evgeni


On Wed, Apr 10, 2013 at 2:02 AM, E Sabof <esabof@gmail.com> wrote:
nlinum works correctly.

Evgeni



On Wed, Apr 10, 2013 at 1:38 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Steps to reproduce:
> Open emacs -Q
> M-: (progn (linum-mode) (hs-mode))
> Insert a block of comments
> M-x hs-hide-block

Could you test it with nlinum-mode (available from GNU ELPA)?


        Stefan