Fix behavior with large undo lists
This commit is contained in:
parent
4115e410d6
commit
bb78981e1d
|
@ -53,10 +53,10 @@
|
||||||
"Stores the value currently in app-db, so the user can later undo"
|
"Stores the value currently in app-db, so the user can later undo"
|
||||||
[explanation]
|
[explanation]
|
||||||
(clear-redos!)
|
(clear-redos!)
|
||||||
(reset! undo-list (vec (take
|
(reset! undo-list (vec (take-last
|
||||||
@max-undos
|
@max-undos
|
||||||
(conj @undo-list @app-db))))
|
(conj @undo-list @app-db))))
|
||||||
(reset! undo-explain-list (vec (take
|
(reset! undo-explain-list (vec (take-last
|
||||||
@max-undos
|
@max-undos
|
||||||
(conj @undo-explain-list @app-explain))))
|
(conj @undo-explain-list @app-explain))))
|
||||||
(reset! app-explain explanation))
|
(reset! app-explain explanation))
|
||||||
|
|
Loading…
Reference in New Issue