Close code hints when 'home' or 'end' is pressed.

Fixes issue #3629