# HG changeset patch
# User Mathias Dahl <mathias.dahl@gmail.com>
# Date 1153734009 0
# Node ID bb51418c995c21832447af6ffba0e9205e3fc7fe
# Parent  b5cc98f000c18fbc2444dee308730304d895838f
Add extra check for end of buffer.

diff -r b5cc98f000c1 -r bb51418c995c lisp/tumme.el
--- a/lisp/tumme.el	Mon Jul 24 09:39:43 2006 +0000
+++ b/lisp/tumme.el	Mon Jul 24 09:40:09 2006 +0000
@@ -1659,7 +1659,8 @@
             (insert "\n")
           (insert " ")
           (setq count (1+ count))
-          (when (= count (- tumme-thumbs-per-row 1))
+          (when (and (= count (- tumme-thumbs-per-row 1))
+		     (not (eobp)))
             (forward-char)
             (insert "\n")
             (setq count 0)))))