File menu -> Settings -> Editor -> General -> Virtual Space and uncheck ‘Allow placement of caret after end of line’ . You may also uncheck the other options in the Virtual Space panel.