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

@ -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()