2348 Error handle:[:ex | |
2358 Error handle:[:ex | |
2349 ] do:[ |
2359 ] do:[ |
2350 stringWithOutControl := stringWithOutControl utf8Decoded |
2360 stringWithOutControl := stringWithOutControl utf8Decoded |
2351 ]. |
2361 ]. |
2352 ]. |
2362 ]. |
2353 (cursorCol + outstandingLine size + stringWithOutControl size) >= numberOfColumns ifTrue:[ |
2363 nCharsInLine := stringWithOutControl size. |
|
2364 (autoWrapFlag |
|
2365 and:[ (cursorCol + outstandingLine size + nCharsInLine) >= numberOfColumns ] |
|
2366 ) ifTrue:[ |
|
2367 charIdx := 1. |
|
2368 nFit := numberOfColumns - outstandingLine size - cursorCol - 1. |
|
2369 nFit > 0 ifTrue:[ |
|
2370 access critical:[ |
|
2371 outstandingLine size > 0 ifTrue:[ |
|
2372 outstandingLine := outstandingLine , (stringWithOutControl copyTo:nFit). |
|
2373 ] ifFalse:[ |
|
2374 outstandingLine := (stringWithOutControl copyTo:nFit). |
|
2375 ]. |
|
2376 ]. |
|
2377 charIdx := nFit + 1. |
|
2378 ]. |
|
2379 "/ Transcript show:'idx: '; show:charIdx; show:' n:'; showCR:nCharsInLine. |
|
2380 oldCollectSize := collectSize. |
|
2381 collectSize := 32*1024. |
2354 "/ characterwise, for correct wrap handling at line end |
2382 "/ characterwise, for correct wrap handling at line end |
2355 stringWithOutControl do:[:eachCharacter | |
2383 [charIdx <= nCharsInLine] whileTrue:[ |
|
2384 |eachCharacter| |
|
2385 |
|
2386 eachCharacter := stringWithOutControl at:charIdx. |
2356 self nextPut:eachCharacter. |
2387 self nextPut:eachCharacter. |
2357 self endEntry. |
2388 "/ self endEntry. |
2358 cursorCol >= numberOfColumns ifTrue:[ |
2389 cursorCol >= numberOfColumns ifTrue:[ |
|
2390 "/ self endEntry. |
2359 self validateCursorCol:cursorCol inLine:cursorLine. |
2391 self validateCursorCol:cursorCol inLine:cursorLine. |
|
2392 "/ Transcript show:'col now: '; showCR:cursorCol. |
|
2393 nFit := numberOfColumns - cursorCol - charIdx. |
|
2394 "/ Transcript show:'nFit now: '; showCR:nFit. |
2360 ]. |
2395 ]. |
|
2396 charIdx := charIdx + 1. |
2361 ]. |
2397 ]. |
2362 crnlFollows ifTrue:[ |
2398 crnlFollows ifTrue:[ |
2363 self nextPut:Character return. |
2399 self nextPut:Character return. |
2364 self nextPut:Character nl. |
2400 self nextPut:Character nl. |
2365 ]. |
2401 ]. |
2366 self endEntry. |
2402 self endEntry. |
|
2403 collectSize := oldCollectSize. |
2367 ] ifFalse:[ |
2404 ] ifFalse:[ |
2368 |
2405 |
2369 Debug ifTrue:[ |
2406 Debug ifTrue:[ |
2370 Transcript showCR:'String:<', stringWithOutControl, '>'. |
2407 Transcript showCR:'String:<', stringWithOutControl, '>'. |
2371 stringWithOutControl do:[:ch | |
2408 stringWithOutControl do:[:ch | |