Closed jgharston closed 5 years ago
Merged, and editing keys are working :+1:
Update. While line editing is working, deleting a character has the odd effect (in the text mode builds) of deleting BOTH the character to the left of the cursor AND the character under it!
On 15-09-2019 21:47, Michael McConnell wrote:
Update. While line editing is working, deleting a character has the odd effect (in the text mode builds) of deleting BOTH the character to the left of the cursor AND the character under it!
I've noticed a few oddities in the line editor, for instance delete to end of line (Ctrl-K) leaves the screen updated oddly and the cursor misplaced.
Also, the editor is sort-of supposed to be the Unix line editor, with that Ctrl-U deleted to the start of line, but in Brandy it deletes the whole line. ie should do: hello#world -> Ctrl-U -> #world but does: hello#world -> Ctrl-U -> #
The actual implementation is the Acorn implementation, but the Acorn implementation never had the ability to move within the line, so for Ctrl-U deleting the whole line was the implementation of delete to start of line.
-- J.G.Harston - jgh@mdfs.net - mdfs.net/jgh
I've fixed the DEL issue - it was a missing break statement, making the code drop into the CTRL-D handler!
Anyway, there's now a switchable setting for DEL behaviour, as in the text-mode builds in Linux the backspace key sends &7F so in these builds this key defaults to deleting as per BS (&08), BBC-style. This is switchable at runtime with SYS "Brandy_DELisBS" (SYS &140008), defaulting to 1 on UNIX text builds, 0 otherwise.
Had dropped a line from readline().