Fixes #2826: only run set_code() on submit if the config template editor is already in diff mode