Commit e7c4090
committed
mipsy_web: fix undo/redo
Calling setValue on the editor causes it to drop the current
undo/redo history, and set_editor_value() is called whenever
the user changes the source code. This resulted in undo/redo
not working at all. This commit changes set_editor_value to
only call setValue() when there's a difference between the
new and old value.
There's likely a nicer way of fixing this that involves
set_editor_value() not being called as often -- but this
change seemed least likely to introduce a bug related to
a desync between the editor's and the app's view of the
editor contents.1 parent f636aad commit e7c4090
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
0 commit comments