* add history to localstorage + way to restore state
* lintfixes
* work in progress; diffing of history
* lintfix
* inline diff
* set editor layout
* lintfix
* refactoring
* able to load from history from loadsave dialog
* different menu icon
* capitalisation consistency
* remove id's, dont seem to be needed
* maxHistoryEntries const
* refactor
* use class instead of id for inlinediff checkbox
* lintfix
- Add language
- Adds Nim compiler
- supports js, c, c++ outputs (objc not tested)
- prevent --run option
- Basic test for nim
Todos:
- monaco profile for Nim
The save/load builds a tabbed list using a .active class to select which
tab to show. This class is also used for styling button highlights in
pickers. We can remove the bare .active and .active:hover rules because
they exactly match the .btn-light.active rules, and every other use of
the active class also has a btn-light class attached to it.
Fixes#1718
This increases the size of the tab bar tabs and buttons on mobile, to
make it easier to work entirely in tab mode. The media query for this
button size begins at 768px because that's where the top bar UI switches
to mobile mode.
Fixes#1717
This adds some overrides for the hamburger menu styles in dark-mode, as
well as some low-specificity rules for the `fa` icons. They need to be
low specificity in order to avoid overriding colors for icons that are
specifically colored, like the green and red checks and Xs in the status
bars.
Fixes#1720
When there are enough tabs, you use a dropdown selection to pick the
other tabs. This would display under the compiler selection dropdown
list, making it very difficult to use.
The .lm_tab dropdown has its z-index set to 5 to show up on top, but
it's stuck inside the .lm_header stacking context, so it can't render
in front of that. Raising the z-index of that whole stacking context
fixes things.
Fixes#1714
- Use `const` where it is possible.
- Move regexes into variables and give them a name.
- Eliminate `lineNumber` variable and use the length of the asm array.
- Use `updateDecorations()` function to decorate label usages.
- Update and fix test cases.
Parsing the labels on the server-side is more general, more flexible
and it can be easily tested.
- Store label definitions in a map. The key will be the label name and
the value will be the line number where the label definition can be
found.
- For each line get the labels which are used in the given line and
remove labels which do not have a definition.
- Modify the return value of the `processBinaryAsm` and `process`
function to return with the label definition too.
- Demangle the label usages and the label definitions too.
- Parse the labels asynchronously when a new assembly result is set
to the compiler view.
- `Ctrl + click` on a label will bring us to the label definition.
Create new keyboard and mouse events to catch this.
- Create a new context sensitive option in the context menu. If no
label can be found in the clicked position, the menu option will not
be shown.
- Select the range of the label definition when jumping to a label.
This is a workaround to make cross origin monaco web workers function
in spite of the monaco webpack plugin hijacking the MonacoEnvironment global.
see https://github.com/microsoft/monaco-editor-webpack-plugin/issues/42
This workaround wouldn't be so bad, if it didn't _also_ rely on *another* bug to
actually work.
The webpack plugin incorrectly uses
window.__webpack_public_path__
when it should use
__webpack_public_path__
see https://github.com/microsoft/monaco-editor-webpack-plugin/pull/63
We can leave __webpack_public_path__ with the correct value, which lets runtime chunk
loading continue to function correctly.
We can then set window.__webpack_public_path__ to the below handler, which lets us
fabricate a worker on the fly.
This is bad and I feel bad.
The setting name changed so the default applies to users
who have visited the site between now and when it was pushed
As noticed by @vincentisambart on #1653, it turns out that having
ligatures enabled by default is not a wise idea