Implemented proper handling of syntax errors.
While scrolling through history the cursor is now placed behind the command.
Fixed auto scroll issues.
Fixed multiline input issues.