Repository navigation
v3.10.0
A text value knows how wide it is, and the editor is one you can work in.
AP 6.4.15.13 defines display width and PasUnicode.Columns answers it, so a
column in the editor is a cell rather than a byte; and the editor opens eight
documents, scrolls sideways, lands on a diagnostic in whichever of them it
names, and draws in twenty-four-bit colour where the terminal has it.
Added
- A question is a box (ADR-0392).
Find,Go to lineandSave asare
centred framed dialogs instead of a line at the bottom, so the editor draws
one kind of thing for one kind of thing. It is the second user of the panel
primitives, which is what tests whether they are an abstraction. - The editor has a menu bar (ADR-0391):
File Edit Search Runalong
the top, F10 (or Ctrl-O) to open, arrows to move, Enter to choose, Ctrl-C to
close — drawn as a framed drop-down in real box characters. A screen
became one array element per display column to make that possible:┌is
three bytes and one column, so a row indexed by byte could not hold a frame
and keep the colour plane naming what a person sees. A menu item names a
key, so choosing one is the same path as pressing it — no second dispatch. - The editor decodes the function keys and binds two of them in Turbo
Pascal's positions: F2 is Save and F9 is Build. Both spellings a
terminal uses are understood —ESC O Q(SS3) andESC [ 1 2 ~(CSI) are
the same key — and the decoder maps a bound one to the key it is bound to,
so nothing above it learns that Save has two spellings. The other ten are
decoded and reported by number (F5 is not bound) rather than ignored. The
hint bar now readsF2 Save F9 Build ….
Added
- A second reading of the width properties (ADR-0400).
East_Asian_Width is the one Unicode property here with no conformance
file, so the newicu-widthcase compares AP 6.4.15.13's table against
ICU's reading of the same two files — applying the clause's own rules
toUCHAR_EAST_ASIAN_WIDTHandu_charType, so what is compared is two
transcriptions and not two opinions about rendering. 1 112 064 code
points, exact agreement. It abstains when ICU's Unicode version is not
the pinned one, which is what makes exactness a claim worth making. - The editor scrolls sideways (ADR-0397). A line wider than the window
was cut; the window follows the cursor now, by column rather than by
byte, so a line of Japanese scrolls by what a person sees and a wide
character straddling the edge is dropped rather than half-drawn. - The editor opens more than one file at once (ADR-0396). F3 opens, F6
goes to the next, up to eight — each with its own cursor, scroll, dirty mark
and undo journal, and the status line says which of how many. This is what
makes it usable on this compiler:pascalctranslates every
program-component and this compiler is three of them, so a diagnostic
naming an open document is now landed on, switching to that file. PasUnicode.Columns, and AP 6.4.15.13 to define it (ADR-0395). How many
cells a text value occupies when a fixed-pitch terminal draws it: Wide and
Fullwidth take two, a mark or a format character takes none, and the unit is
the element, soewith a combining acute is one cell and a family
emoji is two rather than six. AP 6.4.15 NOTE 14 had put this outside the
language and is amended to point at the clause — it was right that no
property of a character answers for a proportional font, and wrong that
nothing was left to answer.- The editor edits East Asian text correctly (ADR-0395). A column is a
cell rather than a byte, the arrows and Backspace and Delete move by
element, and a wide character occupies two cells with the second holding
nothing.ed.colis still a byte and the status line still shows one,
becausepascalcreports a diagnostic's column in bytes and Ctrl-B has to
land on it. PasTerm.SetRgb, twenty-four-bit colour (ADR-0394). SGR's direct
38;2;r;g;bform over anOctetsubrange, beside the eight ANSI colours
the module has had. It has noclDefaultand cannot — the terminal's own
colour has no numeric value to name — so a program drawing a document still
writesSetColour(clDefault, clDefault)and leaves the person's own colours
alone. Whether a terminal understands the form is the caller's policy: there
is no query one lacking it answers safely, andCOLORTERMis what emulators
set.- The editor draws a published palette where the terminal can show it
(ADR-0394).apidereadsCOLORTERMonce and keeps two tables: the eight
ANSI colours for every terminal, and five colours of the LUXE scheme for
one that says it understands twenty-four bits. Five of ten is the finding
rather than a compromise — the scheme's rose, khaki, slate, blue and
vermilion reach at best 6.7:1 against anything else in it, and every cell of
a text editor is text. Both tables are held to the same floor.
Fixed
- Ctrl-B no longer lands on the wrong line of the wrong file.
EditFault
parsedfile:line:col:and threw the filename away, so a diagnostic naming
one of the other program-components jumped to that line number in whatever
document was open and displayed the message as though it had arrived there.
pascalctranslates every component and this compiler is three of them, so
that was the ordinary case rather than a corner. A diagnostic about another
file is now reported as the compiler wrote it, position and all, and the
cursor stays where it was. - The editor's colour is legible, and a role that nothing draws now fails a gate (ADR-0393). A drop-down's body was cyan on blue, which is 4.8:1 on xterm's own palette and worse on a muted theme, and the message line was yellow on the terminal's own background, which on a light terminal is yellow on white. Every role but the document's text now pairs black or white with a colour, at 7.5:1 or better. And a dialog's answer is drawn as a field again:
crPrompt— the editor is waiting for you — had been declared, coloured and drawn on no screen since the prompts became boxes, with all fifteen session goldens agreeing. The newtui-palettecase holds both claims in both directions. - A menu that was legible and indistinguishable (ADR-0394). The fix above
put the selected menu title at black on white against a black-on-cyan bar:
16.7:1 to read and 1.6:1 away from the four titles beside it, so nothing
said which menu was open. A contrast floor cannot see that — both pairs pass
it — sotui-palettenow also requires two regions a person sees at once to
differ in their backgrounds by 3:1, and the three bars along the bottom
were rechosen together.
Changed
- The editor is
apide, and that is now its only name. v3.9.0 installed
it asafterschool, on the conventionpascalcsets over
selfhost/compiler.pas— buttui/build.pynames its default output after
the program it was given, so the script wrotebuild/bin/apideand the
CMake target wrotebuild/bin/afterschool, leaving one program under two
names with nothing to say which one a document meant. The script's default
is what keepsbuild.py '' session.pasfrom overwriting the editor and so
could not move; the binary did.cmake --buildnow produces
build/bin/apideandcmake --installputs it in<prefix>/bin/apide.