Ctrl-C to copy. Fix crash if selection extends beyond the end of line.