In the Microsoft style, allow a line to be selected by clicking once in the left margin of the code window. Allow dragging to select multiple lines.
To make this work, a region of the left margin must accept the click. To indicate when the editor will accept such a click, change the mouse pointer from left pointing to right pointing, also a Microsoft convention.