Fixes#7926.
Android 5.0 (Chrome 37) only supports ES3. Thus, we should transpile our
lexical models to ES3 rather than ES2015, for now at least.
For example, this forces constructs such as `const` to be replaced with
`var`.
Fixes#7829.
The online update check could crash on shutdown because the thread
destructor would run from the wrong thread. This caused the main form
destruction, which happens if the user chooses to install the update,
to be triggered from the worker thread, leading to much pain.
Fixes#7808.
If a project is moved, then the MRU, which has absolute path names, will
probably have references to files that don't exist. Rather than leave
these in the list, to be opened and potentially recreated in the wrong
place, we should just remove them entirely.
Fixes#7810.
This addresses a regression introduced in #7631, where URL parameters
with spaces would be encoded into `+` instead of `%20`. Looking a bit
deeper at the Delphi `TNetEncoding.URL.Encode` function I realised that
it was entirely inadequate. Some guy named Marc Durdin wrote a blog a
good few years ago about the problem, and that's what I ended up using.
This encoding issue caused filenames with spaces (by default, project
paths in Developer have spaces) to give a 404 when editing a touch
layout, which meant that the touch keyboards could not be saved.
Also fixes KEYMAN-DEVELOPER-74, where the + encoding caused multiple
entries to appear in the filename cache.
Amusing to Google this problem, find solid answer on SO, which pointed
to my very own blog. Embarrassing that my own code didn't already
include my own fix.
A secondary issue is also fixed here, where request parameters were
double-decoded for formencoded POST requests. The fix for broken URL
encodings was only required for GET requests.
This also showed up in KEYMAN-DEVELOPER-74, with double-encoded paths
being registered as source files.
Fixes#7658.
When manipulating text that contains an unpaired surrogate, the text
editor could throw an exception trying to encode the text to send
through to the token command. This simply masks that error.
Fixes#4757.
Fixes#6928.
Three separate ways shutdown is more robust:
1. Destroy main form before web server -- this ensures that all main
form routines have deregistered app sources from web server.
2. In some situations, `FormClose` can be skipped by shutdown routines,
for example, if you call `Application.Terminate`. This change ensures
that we get a second chance to cleanup in the form destructor with
`DoCloseCleanup`.
3. In the Online Update Check, instead of `Application.Terminate`, we
now use `Application.MainForm.Close`, which is much more polite, as
it ensures that changed files are saved, etc, and does proper
cleanup. This particular change may make the other two somewhat
irrelevant but they are still sensible as they will cover us for
other potential form destruction sequences.
Relates to #6928 and KEYMAN-DEVELOPER-74.
Fixes one more potential pathway for assertions being raised, and adds
some extra debugging in case there are additional pathways we are not
capturing.
Fixes#7649.
emit_keystroke code path in kmx processor was writing directly to the
core queue instead of to the internal kmx processor queue. This caused
it to be out-of-order in the actions sent to the engine/debugger.
Engines didn't really care but it broke the debugger, for example if
only a deadkey was in the buffer and backspace was pressed, Developer
would assert as it would get unexpected context for the deletions.
Fixes#7641.
If you close the active project and have the Welcome window visible, it
was possible for the Compile action to still be enabled, even though
there was nothing to compile.
Fixes#7628.
Indy components do not treat URLs as UTF-8. Our legacy EncodeURL
function (sourced from Indy components) was the same. Discovered we
needed to fixup the parsing of URLs as well as the construction of them;
there may be other places we need to fix, although I did do a search for
the relevant types in TIKE source.
Updates Monaco editor from 0.14.3 to 0.15.6, incorporating
microsoft/vscode#57617 to fix#7625.
The changes to editor.js are required because `editor.model` was not a
public property and we should have been using `editor.getModel()` all
along.
I have not updated to the latest version of monaco (0.35.1 at time of
writing this), as I wish to minimize the changeset during beta.
While I prefer not to update dependencies in beta, this seems to be a
fairly clean update. Will monitor and can roll back if it leads to
instability.
Fixes#7616.
Fixes a crash when attempting to infer key cap text from key id, and
cleans up the support for inferred key text so that it works correctly
in the designer.
Also adds a safeguard to KMW to stop invalid key ids causing a crash.