I’ve found a bug in CodeEditorComponent.
It is triggered if you use a custom font, then the mouse selection is bogus.
You can easily reproduce this In Juce Demo by adding the following line
in CodeEditorDemo.cpp line 45, right before the content loading.
Then you select a sentence portion using the mouse, then copy/paste to another place and you will see that the copied text is not what you just had selected.