kopia lustrzana https://github.com/jameshball/osci-render
Clear the undo history in the code editor when opening a new file
rodzic
9fab198fb1
commit
cf56c510ea
|
@ -33,7 +33,10 @@ public class CodeEditor extends StackPane {
|
|||
this.newFile = true;
|
||||
JSObject window = (JSObject) webview.getEngine().executeScript("window");
|
||||
window.setMember("newCode", editingCode);
|
||||
webview.getEngine().executeScript("editor.setValue(newCode);");
|
||||
webview.getEngine().executeScript("""
|
||||
editor.setValue(newCode);
|
||||
editor.clearHistory();
|
||||
""");
|
||||
}
|
||||
|
||||
public void updateCode() {
|
||||
|
|
Ładowanie…
Reference in New Issue