Repository navigation
v0.16.0
Highlights
Real tabs
TAB now inserts a tab character instead of a run of spaces. Tabs are stored in the
file and expanded only when drawn, so a file's tabs survive being opened and saved.
The tab width is 4 columns; making it configurable is planned for a later release.
Previously tabs were converted to spaces on load and while typing as a workaround.
LEFT/RIGHTstep over a tab in one press, since it is one character.- The cursor sits at the column where a tab begins.
UP/DOWNkeep the screen column rather than the byte offset, so the cursor no
longer slides sideways when moving between lines with different tab layouts.
If you edit an existing file, tabs you type are written as tab characters. Files
previously saved with expanded spaces keep those spaces.
Horizontal scrolling is now smooth
Scrolling sideways on a long line used to repaint the whole screen for every column,
about 4,600 characters over the VDP link. It now uses the VDP's own region scroll --
the same mechanism used for vertical scrolling -- and paints only the newly exposed
column:
| Firmware | Before | After |
|---|---|---|
| VDP 2.16.0 | 33 ms per column | ~2 ms |
| VDP 1.04 | 47 ms per column | 2.2 ms |
Holding an arrow key along a long line keeps up now. All rows scroll together, so the
whole screen stays aligned with the cursor.
Fixes
- Two heap overflows. Typing a long enough filename at the
File name:prompt
wrote past the end of its buffer, and opening a file larger than the text buffer read
past the end of the allocation. Both are bounded now; an oversized file is refused
withfile too large. - Tab expansion on load was wrong on the first line of a file. Gone with the
expansion itself. - A cursor could become invisible when it sat on a tab, and inserting a character on a
horizontally scrolled line could leave the line showing stale text.
Compatibility
Minimum firmware is now MOS 2.2.3 (was 2.2.0) and VDP 1.04 or above. 2.2.0
through 2.2.3 all shipped within three days in 2024, so the floor is the last point
release of that line rather than its first.
Install aed.bin into /bin on the SD card, as in v0.15.0. If you still have an old
/mos/aed.bin, delete it -- MOS searches /mos first and a copy there will crash.
Verified
Built with AgonDev (clang 15.0.7), no warnings under -Wall -Wextra. 8 host test files
pass under AddressSanitizer and UBSan. Every change was checked in the emulator on
both ends of the supported range: MOS 3.0.2 / VDP 2.16.0 and MOS 2.2.3 / VDP 1.04.
What's Changed
- Move file saving into the model by @avalonbits in #55
- Bound cb_put so a full buffer cannot overflow the heap by @avalonbits in #56
- Give the view sole ownership of the cursor column by @avalonbits in #57
- Raise the documented MOS floor to 2.2.3 by @avalonbits in #58
- Move the scroll and viewport mechanism into the view by @avalonbits in #59
- Real tab support: store the byte, expand when painting by @avalonbits in #60
- Scroll horizontally with the VDP instead of a full repaint by @avalonbits in #61
- Do not claim the tab width is configurable by @avalonbits in #62
Full Changelog: v0.15.0...v0.16.0