COMMON: fix graphics mode newline handling