iets3.opensource
iets3.opensource copied to clipboard
Cannot add TopLevelContents at the end of a Chunk
How to reproduce:
- Create a toplevel item, such as a KernelF library
- Add an item in the contents nlist of the library, e.g. constant: val a = 1
- Now try to press Enter after this newly added item
What happens: you cannot add an item. Worst case, it may add a multiplication to a value or do other weird stuff.
Expected behavior: you should be able to add an item after the end.
Suggested solution direction: this quirk happens due to the projectional editor of MPS. It can be solved (or at least worked around) in the same way mbeddr did for its functions: by simply adding a read-only element at the end of a TopLevel content (like the "end function" in mbeddr), e.g.:
library A end library A <-- add this as a read-only constant, then adding new contents to the contents nlist of the TopLevelContents holder will be possible.
I don't understand what you mean. After you enter an item, you can press enter to insert one or multiple empty lines:
https://user-images.githubusercontent.com/88385944/194805645-7ed43f9e-d146-45d7-93a2-22a4fa6138c0.mov
I observed similar behavior using Units
:
A hotfix could be to provide an intention or allow CTRL+Enter at the end of UnitReference
to create a new empty line.
I observed similar behavior using
Units
:A hotfix could be to provide an intention or allow _CTRL+Enter_ at the end of `UnitReference` to create a new empty line.
The behavior for units is partilaly improved in PR #676. Can you check whether you can add a new line with the changes from the PR (by selecting the new grey bar as the EOL)?