david-pfx / PuzzleScriptNext

A direct successor to PuzzleScript, building on the work of PuzzleScript Plus, Pattern:Script and others.
http://www.puzzlescriptnext.polyomino.com
MIT License
11 stars 4 forks source link

Editor fails to load the last save files on startup #59

Closed david-pfx closed 2 months ago

david-pfx commented 2 months ago

@cool nico PuzzleScript Next never loads the last thing you were working on and instead loads the starter project which is pretty annoying. I checked editor.js and this behaviour is because 1) It edits code.value (when it should use editor.setValue(sd.text) since at this point the editor has already been created) 2) It tries to load the starter file even if there is a save. This code is executed even after code.value has changed so it's the last thing that modifies the CodeMirror editor

david-pfx commented 2 months ago

Fixed. Just a chunk of code in the wrong place.