It's not so tricky to do column editing, but rather than have to hack the CodeEditor component can I ask that you add a method to retrieve selectionStart as you have for caretPos. The only other change needed is to make CodeEditorComponent::updateCaretPosition() virtual so it can be overridden. With that it makes it possible to do some nice non-linear editing.
[EDIT] sorry, i forgot to say that I also had to create a simple utility method in CodeEditorComponent to set the caret pos.
Another quick request, would it be possible for you to make CodeEditorComponenet::pasteFromClipboard() virtual? If implementing a column-edit mode it's important to be able to insert the contents of the clipboard to multiple lines at once. Thanks.
It's actually surprising easy to do this given the flexibility of the CodeDocument and CodeDocument::Position class, and having updateCaretPosition virtual too. I could leave it at that, but now I would like to implement mulit-line backspace and delete, so I've had to make CodeEditorComponent::deleteBackwards() and CodeEditorComponent::deleteForwards() virtual too. I hope they are the last methods I need to make virtual. The only thing that I've not figured out is multi-line multi-char select and delete(draw a box type of select), but if users want that they can whistle for it!