cac-t-u-s / om-sharp-users

A public forum for support / issues / suggestions about OM#
3 stars 0 forks source link

wrap text in patch-editor "Info and properties" pane #79

Open andersvi opened 11 months ago

andersvi commented 11 months ago

Hi.

The infotext does not wrap in patch-editor "Info and properties" pane

andersvi commented 11 months ago

I think this fixes it:

diff --git a/src/visual-language/patch/patch-editor.lisp b/src/visual-language/patch/patch-editor.lisp
index d1dc1bc2..62cad2dd 100644
--- a/src/visual-language/patch/patch-editor.lisp
+++ b/src/visual-language/patch/patch-editor.lisp
@@ -1782,10 +1782,11 @@ The function and class reference accessible from the \"Help\" menu, or the \"Cla
                (list
                 (let* ((doc (default-editor-help-text (editor self)))
                        (line-h (cadr (multiple-value-list (om-string-size "ABC" text-font))))
-                       (n-lines (length (om-string-wrap doc def-w text-font))))
-                  (om-make-di 'om-multi-text
+                       (doc-wrapped (om-string-wrap doc def-w text-font))
+              (n-lines (length doc-wrapped)))
+         (om-make-di 'om-multi-text
                               :size (om-make-point def-w (* line-h (+ 2 n-lines)))
-                              :text doc
+                              :text doc-wrapped
                               :fg-color (om-def-color :dark-gray)
                               :font text-font)
                   )))