From ce63c5b75f7e66ae5a26d9a21e1877fb3e4cb70e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 28 Jan 2014 02:45:51 -0700 Subject: [PATCH] racket/gui: correct undo array resize for Emacs-style undo --- pkgs/gui-pkgs/gui-lib/mred/private/wxme/editor.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wxme/editor.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wxme/editor.rkt index 74045ba70e..5d1ecb1876 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wxme/editor.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wxme/editor.rkt @@ -899,7 +899,10 @@ (size . < . max-undos) emacs-style-undo?) ;; 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)]) (for ([j (in-range size)]) (vector-set! naya j (vector-ref c (modulo (+ start j) size))))