editor: preserve code editor undo history between consecutive edits of a same widget's property

This commit is contained in:
jean-emmanuel 2026-01-22 10:52:20 +01:00
parent c59c4a8065
commit 5bf5ab8754
2 changed files with 8 additions and 1 deletions

View file

@ -5,6 +5,9 @@
- bug fixes
- when using objects in properties, numbers-as-strings and booleans-as-strings values are now preserved instead of being converted to their litteral counterparts
- editor
- preserve code editor undo history between consecutive edits of a same widget's property
## 1.30.1
- bug fixes

View file

@ -242,7 +242,11 @@ class CodeEditor {
field.appendChild(this.helpBtn)
field.appendChild(this.fsBtn)
editor.getSession().getUndoManager().reset()
if (this.hash !== widget.hash) {
// preserve undo history if widget is the same
editor.getSession().getUndoManager().reset()
this.hash = widget.hash
}
editor.resize()