Basically just do like for the Lua editor: https://github.com/CE-Programming/CEmu/commit/ed97832c38ff97333c638f7af4623c4cd89059a3#diff-1ab30fd710566ccc19a3fd2a811c2057