Fixed gtk:text-buffer-insert handling of len argument
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Fri, 13 Feb 2009 13:45:10 +0000 (16:45 +0300)
committerDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Fri, 13 Feb 2009 13:45:10 +0000 (16:45 +0300)
gtk/gtk.text.lisp

index 10a994a..8da3690 100644 (file)
   (assert (typep position '(or text-iter (member :cursor))))
   (if interactive
       (if (eq position :cursor)
-          (gtk-text-buffer-insert-interactive-at-cursor buffer text (length text) default-editable)
-          (gtk-text-buffer-insert-interactive buffer position text (length text) default-editable))
+          (gtk-text-buffer-insert-interactive-at-cursor buffer text -1 default-editable)
+          (gtk-text-buffer-insert-interactive buffer position text -1 default-editable))
       (progn (if (eq position :cursor)
-                 (gtk-text-buffer-insert-at-cursor buffer text (length text))
-                 (gtk-text-buffer-insert buffer position text (length text)))
+                 (gtk-text-buffer-insert-at-cursor buffer text -1)
+                 (gtk-text-buffer-insert buffer position text -1))
              t)))
 
 (export 'text-buffer-insert)