set t [text .t -height 10 -width 50 -wrap word]
# if widget is drawn error doesn't occur, so draw it not

.t insert end {Muutamiasanojaainayhteen kirjotettunajottasaadaanmelkoisen pitkiäsanojajoitasitten}
# less than that is not enough

set i 1.0
set xi $i

while {[$t index "$i lineend"] ne [$t index "$xi display lineend"]} {
 puts [$t get "$i + 1 display lines display linestart" "$i + 1 display lines display lineend"]
 set i [$t index "$i + 1 display lines"]
}
