racket/gui: correct undo array resize for Emacs-style undo
This commit is contained in:
parent
c8554e2489
commit
ce63c5b75f
|
@ -899,7 +899,10 @@
|
||||||
(size . < . max-undos)
|
(size . < . max-undos)
|
||||||
emacs-style-undo?)
|
emacs-style-undo?)
|
||||||
;; make more room
|
;; make more room
|
||||||
(let* ([s (min (* size 2) (if (eq? max-undos 'forever) (* size 2) max-undos))]
|
(let* ([s (min (* size 2) (if (or (eq? max-undos 'forever)
|
||||||
|
emacs-style-undo?)
|
||||||
|
(* size 2)
|
||||||
|
max-undos))]
|
||||||
[naya (make-vector s #f)])
|
[naya (make-vector s #f)])
|
||||||
(for ([j (in-range size)])
|
(for ([j (in-range size)])
|
||||||
(vector-set! naya j (vector-ref c (modulo (+ start j) size))))
|
(vector-set! naya j (vector-ref c (modulo (+ start j) size))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user