1
0
Fork 0

- [GUI] prevented wrapping of preformatted lines.

This commit is contained in:
cage 2023-03-16 14:11:05 +01:00
parent 67d2a06630
commit a896c5642e
1 changed files with 10 additions and 3 deletions

View File

@ -337,7 +337,7 @@
:leave-callback :leave-callback
(lambda () (print-info-message ""))) (lambda () (print-info-message "")))
(gui:append-line gemtext-widget ""))))) (gui:append-line gemtext-widget "")))))
(render-line (key text line-number) (render-line (key text line-number &key (wrap :word))
(let ((font (key->font key)) (let ((font (key->font key))
(justification (key->justification key)) (justification (key->justification key))
(start-index `(:line ,line-number :char 0))) (start-index `(:line ,line-number :char 0)))
@ -351,6 +351,7 @@
(gui:make-indices-end)))) (gui:make-indices-end))))
(gui:tag-configure gemtext-widget (gui:tag-configure gemtext-widget
tag tag
:wrap wrap
:font font :font font
:foreground foreground :foreground foreground
:background background :background background
@ -371,7 +372,10 @@
(:as-is (:as-is
(vector-push-extend (ir-line line) ir-rendered-lines) (vector-push-extend (ir-line line) ir-rendered-lines)
(incf render-line-count) (incf render-line-count)
(render-line :as-is (a:last-elt ir-rendered-lines) render-line-count)) (render-line :as-is
(a:last-elt ir-rendered-lines)
render-line-count
:wrap :none))
(:text (:text
(vector-push-extend (ir-line line) ir-rendered-lines) (vector-push-extend (ir-line line) ir-rendered-lines)
(incf render-line-count) (incf render-line-count)
@ -401,7 +405,10 @@
(incf render-line-count) (incf render-line-count)
(setf starting-pre-block-line (1+ render-line-count)) (setf starting-pre-block-line (1+ render-line-count))
(setf current-pre-block-alt-text (ir-pre-alt-text line)) (setf current-pre-block-alt-text (ir-pre-alt-text line))
(render-line :pre (a:last-elt ir-rendered-lines) render-line-count)) (render-line :pre
(a:last-elt ir-rendered-lines)
render-line-count
:wrap :none))
(:pre-end (:pre-end
(vector-push-extend (format nil "") ir-rendered-lines) (vector-push-extend (format nil "") ir-rendered-lines)
(setf ending-pre-block-line (1+ render-line-count)) (setf ending-pre-block-line (1+ render-line-count))