comparison semicongine/text.nim @ 419:18e5443e4f83

del: debug print
author Sam <sam@basx.dev>
date Sun, 28 Jan 2024 22:18:25 +0700
parents 009d93d69170
children cc6a67473a52
comparison
equal deleted inserted replaced
418:009d93d69170 419:18e5443e4f83
64 64
65 proc refresh*(text: var Text) = 65 proc refresh*(text: var Text) =
66 if not text.dirty and text.text == text.lastRenderedText: 66 if not text.dirty and text.text == text.lastRenderedText:
67 return 67 return
68 68
69 echo "Refresh ", text
70 # pre-calculate text-width 69 # pre-calculate text-width
71 var width = 0'f32 70 var width = 0'f32
72 var lineWidths: seq[float32] 71 var lineWidths: seq[float32]
73 for i in 0 ..< min(text.text.len, text.maxLen): 72 for i in 0 ..< min(text.text.len, text.maxLen):
74 if text.text[i] == NEWLINE: 73 if text.text[i] == NEWLINE: