(linum-update-window): Ignore intangible (bug#4996).
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 24 Nov 2009 22:28:01 +0000 (22:28 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 24 Nov 2009 22:28:01 +0000 (22:28 +0000)
lisp/ChangeLog
lisp/linum.el

index f44529c..b56f64a 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-24  Markus Triska  <markus.triska@gmx.at>
+
+       * linum.el (linum-update-window): Ignore intangible (bug#4996).
+
 2009-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Handle the [back] button properly (bug#4979).
index 81b48e9..a73003b 100644 (file)
@@ -166,7 +166,10 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
             (overlay-put ov 'before-string
                          (propertize " " 'display `((margin left-margin) ,str)))
             (overlay-put ov 'linum-str str))))
-      (forward-line)
+      ;; Text may contain those nasty intangible properties, but that
+      ;; shouldn't prevent us from counting those lines.
+      (let ((inhibit-point-motion-hooks t))
+        (forward-line))
       (setq line (1+ line)))
     (set-window-margins win width (cdr (window-margins win)))))