Fix saving and restoring console cursor position.
This commit is contained in:
parent
73d984bca3
commit
bdc791f692
|
@ -841,12 +841,12 @@ void TextTerminal::RunAnsiCommand(TextBuffer* textbuf, char c)
|
||||||
case 's': // Save cursor position.
|
case 's': // Save cursor position.
|
||||||
{
|
{
|
||||||
ansisavedposx = column;
|
ansisavedposx = column;
|
||||||
ansisavedposx = line;
|
ansisavedposy = line;
|
||||||
} break;
|
} break;
|
||||||
case 'u': // Restore cursor position.
|
case 'u': // Restore cursor position.
|
||||||
{
|
{
|
||||||
column = ansisavedposx;
|
column = ansisavedposx;
|
||||||
line = ansisavedposx;
|
line = ansisavedposy;
|
||||||
if ( width <= column )
|
if ( width <= column )
|
||||||
column = width-1;
|
column = width-1;
|
||||||
if ( height <= line )
|
if ( height <= line )
|
||||||
|
|
Loading…
Reference in New Issue