Correct escape sequences. Support for partial scroll