Description
Apologies for interrupting you with a non-music problem.
When using the code editor in Sonic Pi I have noticed that the key does not
always display the last few characters at the end of a long line and the red cursor
does not appear on the screen. Pressing the key for a second time does get
the ending text to appear and the red cursor reappears back on the screen at the end of
the text as expected.
This problem also occurs when using the key at the beginning of the
following line. To get the end of the preceding row to display
properly it is necessary to press or
. If you just use and then then you never
get to see the missing characters.
Needless to say this bug is very disorienting when editing longer lines.
I came across the problem when initialising an array with numbers (eg notes to be
played in a do loop) but I can also get the same effect with commented lines of the
same length. There doesn't appear to be a fixed trigger length for the line, but
so far this has occurred with lines as short as 87 characters. The number of characters not
displayed vary from 1 to 5 characters. The number of missing characters can change if
Sonic Pi is closed and then reopened, or if you try different combinations of
and keys when trying to investigate the problem.
The problem is shown in Sonic Pi 2.9 running on both a Windows 7 PC and a Raspberry
Pi 2 with the latest Raspbian, when using the default editor font size, and using a monitor
with a resolution of 1920x1080.
The following 5 lines reproduce the problem when pasted into a blank buffer in the Sonic Pi
editor on both my computers, with the last 5 characters on line 3 not being displayed. Just
position the cursor somewhere at the beginning of line 3 and press the key.
Welcome to Sonic Pi v2.9
a=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,987654321]
If you delete a character from line 3 then the last 4 characters are not displayed, etc.
The addition of more characters does not seem to make any difference.
As far as I can tell the current cursor position within the text is always correct, it is just
the positioning of the text and lack of the cursor within the coding pane that is wrong.
I hope you are able to look into this sometime.