IntelliJ Idea cursor-wrap goes to infinity and beyond instead of next line on Windows
Find Tools -> IDE Options -> Editor (in OSX it's Preferences -> Editor). In the area entitled "Virtual Space" uncheck "Allow placement of caret after end of line". Click "Apply" and you're good to go.