TextEditor with border is gooberlicious

Adding the following lines:

textBox->setBorder( BorderSize( 32, 32, 32, 32 ) ); textBox->setIndents( 16, 16 );

to MainDemoWindow.cpp in the ctor for class SourceCodeWindow causes the TextEditor object to malfunction.

First of all, I believe that TextEditor::getTextIndexAt() should subtract borderSize from the coordinates (it doesn’t). The result is that the TextEditor computes the wrong index in the text for a given coordinate. You can see this by clicking in the modified demo source code window. The caret will appear far below and to the right of the click location.

The second problem I have not figured out. Screen goobers appear when selecting. Place the insertion point on any line. Now, press control shift end, then deselect. A small selection goober will be left at the beginning of the deselected range.

Another way to see the selection goobers is to click on a line and slowly extend the selection to the right with the mouse. The result will be a 1 pixel jagged bottom on the selection border. This will disappear if the window loses focus (since it gets redrawn).


Hmm, ok, thanks. I’ll take a look at that asap. I’ve noticed one or two ‘goobers’ in the texteditor before, but never managed to replicate them.

Let me clarify that the goobers are only easily reproducible when a border is set. With a stock juceDemo app, they are not perfectly reproducible.