Modify pressing up Arrow key places caret at end of line instead of beginning when compiling with delphi