[patch] Small bugfix in widget.jl



Hi. 

Attached is the patch which fixes a small utf-8 bug. It was brought in
after 1.5, so no news.texi change is necesary.

For log, use this:
------------------------------------------------------------------------
* lisp/sawfish/gtk/widget.jl: Bugfix. Substring position is corrected.
------------------------------------------------------------------------

You can confirm the change in Configurator -> move/resize -> distance
in pixel blah blah. (To see the effect, first enable tooltip.)

Regards,
Teika (Teika kazura)

diff --git a/lisp/sawfish/gtk/widget.jl b/lisp/sawfish/gtk/widget.jl
index e601622..e067aa1 100644
--- a/lisp/sawfish/gtk/widget.jl
+++ b/lisp/sawfish/gtk/widget.jl
@@ -173,9 +173,10 @@
 
   ;; returns (LABEL-STRING . TOOLTIP-STRING-OR-NIL)
   (define (tooltip-split doc)
+    (setq doc (_ doc))
     (if (string-match "\n\n\\s*" doc)
-	(cons (utf8-substring (_ doc) 0 (match-start))
-	      (utf8-substring (_ doc) (match-end)))
+	(cons (substring doc 0 (match-start))
+	      (substring doc (match-end)))
       (cons doc nil)))
 
   (define (tooltip-set widget tip-string #!optional (key "Foo"))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]