Skip to content

Commit 19915ee

Browse files
committed
improve the handling of inserted elements when the lws before and after are on different lines
closes #175
1 parent 0eab2d5 commit 19915ee

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

redex-pict-lib/redex/private/core-layout.rkt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,13 @@
431431
(- next-lw-line line)
432432
new-lw-col
433433
new-lw-col-span)
434-
'spring
435-
(build-lw to-wrap2 next-lw-line 0 (+ new-lw-col new-lw-col-span) 0)
436-
(if after-next-lw
437-
(cons next-lw (loop after-next-lw next-line next-column))
438-
'()))))])))))
434+
(append
435+
(cond [(= line next-lw-line) '(spring)]
436+
[else '()])
437+
(list (build-lw to-wrap2 next-lw-line 0 (+ new-lw-col new-lw-col-span) 0))
438+
(if after-next-lw
439+
(cons next-lw (loop after-next-lw next-line next-column))
440+
'())))))])))))
439441

440442
(define (extract-pieces-to-wrap who lst)
441443
(let ([fst (car lst)])

0 commit comments

Comments
 (0)