Skip to content

Commit f6caa2a

Browse files
committed
move the deletion into the "do afterwards" part
should have been a part of addb2c9
1 parent 4cd1e2a commit f6caa2a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gui-lib/framework/private/text-normalize-paste.rkt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,13 @@
105105
(set! ask? #f)
106106
(unless (ask-normalize?) (abort)))
107107
(define snip-pos (get-snip-position snip))
108-
(delete snip-pos (+ snip-pos (string-length old)))
109108
(set! changes-to-make
110-
(cons (λ () (insert new snip-pos snip-pos #f))
109+
(cons (λ ()
110+
(delete snip-pos (+ snip-pos (string-length old)))
111+
(insert new snip-pos snip-pos #f))
111112
changes-to-make))))
112113
(loop prev-snip))))
113-
(for ([change (in-list changes-to-make)])
114+
(for ([change (in-list (reverse changes-to-make))])
114115
(change)))))
115116

116117
(super-new))))

0 commit comments

Comments
 (0)