OS_ReadLine messing with the screen colours?
Rick Murray (539) 13840 posts |
Ever since using RISC OS 5, I’ve noticed that ShellCLI has rather peculiar colours, like red for the input command and a sort of faded green (or dark yellow) for the output. It appears that this is actually part of the OS_ReadLine code, though I can’t see where it is actually happening. Given that it should be up to the caller what colours are used, and not OS_ReadLine to mess with things itself, this is clearly a bug. Tested: Pi 11th Aug build (but has happened for ages). Test case 1: Press F12 in the desktop Test case 2: MODE 28 DIM buf% 80 SYS "OS_ReadLine", buf%, 80, 32, 255, 0 TO , l% buf%?l% = 13 PRINT $buf% |
Stuart Painting (5389) 714 posts |
I’m not seeing anything odd at all. Test Case 1: Everything appears as black text on a white background. Test case 2: Both the input string and the printed string are white text on a black background. Just in case it mattered, I tried test case 1 with 2 different colour depths (256 colours and 16M colours) – no change. Hardware: Raspberry Pi 1A+, Raspberry Pi 3B, Raspberry Pi 4B. Software: RISC OS 5.29 (11 Aug 2023), RISC OS 5.29 (04 May 2023), RISC OS Pi 5.28 (16 Dec 2020). I tried the “obvious” hardware platforms, but perhaps you’re only seeing the problem on a Pi 2 (which I haven’t got). |
Stuart Swales (8827) 1357 posts |
It’s one of the line editing add-on modules, isn’t it? |
Steve Pampling (1551) 8170 posts |
Rick is a Zap user, so odds-on the LineEditor module (Olly Betts??) is a prime candidate. |
Rick Murray (539) 13840 posts |
This weekend’s brownie points and a little merit star go to Steve for exactly identifying the cause. The BootLineEd file within Zap has this crap: Set CLI$Prompt <17><1>* Set LineEditor$Edit <17><2> Set LineEditor$List <17><3> Set LineEditor$Type <17><4> Set LineEditor$Output <17><5> Commented all of that out, normality has resumed. There… probably ought to be a way to tell LineEditor not to mess with the colours. Because, you know, it’s not only ShellCLI that might want to use ReadLine! Anyway, issue sorted. Thanks, guys, for the pointer. I hadn’t thought about LineEditor (d’oh!). |
Steve Pampling (1551) 8170 posts |
uh-uh, Stuart is the one. I merely recalled your times extolling the virtues of Zap and that it contained the LineEditor module. |