Improve code area selection behavior