Remove extra call to setCharAtCursorDirty
Break the long condition up into multiple lines
EOL_* codes should only be set on the last cell in a line