Skip to content
Snippets Groups Projects
Commit 430c166b authored by Tom Rini's avatar Tom Rini
Browse files

Merge branch 'master' of git://git.denx.de/u-boot-video

parents c06088b3 118f020d
No related branches found
No related tags found
No related merge requests found
......@@ -272,6 +272,14 @@ static void vidconsole_escape_char(struct udevice *dev, char ch)
s++; /* ; */
s = parsenum(s, &col);
/*
* Video origin is [0, 0], terminal origin is [1, 1].
*/
if (row)
--row;
if (col)
--col;
set_cursor_position(priv, row, col);
break;
......
......@@ -178,12 +178,12 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
/* test set-cursor: [%d;%df */
vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd");
ut_asserteq(142, compress_frame_buffer(dev));
ut_asserteq(143, compress_frame_buffer(dev));
/* test colors (30-37 fg color, 40-47 bg color) */
vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */
vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */
ut_asserteq(265, compress_frame_buffer(dev));
ut_asserteq(272, compress_frame_buffer(dev));
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment