]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/TerminalDxe: Improve TtyTerm cursor position tracking
authorBrian J. Johnson <bjohnson@sgi.com>
Fri, 7 Oct 2016 14:53:58 +0000 (22:53 +0800)
committerFeng Tian <feng.tian@intel.com>
Thu, 27 Oct 2016 01:11:14 +0000 (09:11 +0800)
commit851b044f0a4b51101beae9214cf662308995ae1b
tree239b2bf47246f02e60f726eb5d3e43312ba26700
parent2d90b74d027b457615c0739ac9114a976be9eaed
MdeModulePkg/TerminalDxe: Improve TtyTerm cursor position tracking

When we print the last character on a line, the terminal driver wraps
CursorRow/CursorColumn to the beginning of the next line.  But the
terminal itself doesn't wrap its cursor until the next character is
printed.  That throws off the driver's cursor position tracking.

So when we have printed the last character on a line, and are not in
the middle of outputing an escape sequence, synchronize the terminal
with the driver by outputing CR+LF.  This matches the expected
behavior, and the behavior of the VGA console driver.

Only change the behavior of TtyTerm, not the other terminal types.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brian Johnson <bjohnson@sgi.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c