mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 05:58:27 +02:00
Fix the ply_window_set_text_cursor_position function
This commit is contained in:
parent
2261967587
commit
73bcd971fe
1 changed files with 7 additions and 4 deletions
|
|
@ -53,7 +53,7 @@
|
|||
#define KEY_RETURN '\r'
|
||||
#define KEY_BACKSPACE '\177'
|
||||
|
||||
#define MOVE_CURSOR_SEQUNCE(column,row) "\033[f"#row","#column
|
||||
#define MOVE_CURSOR_SEQUNCE "\033[%d;%df"
|
||||
|
||||
struct _ply_window
|
||||
{
|
||||
|
|
@ -446,9 +446,12 @@ ply_window_set_text_cursor_position (ply_window_t *window,
|
|||
int column,
|
||||
int row)
|
||||
{
|
||||
write (window->tty_fd,
|
||||
MOVE_CURSOR_SEQUNCE(row,column),
|
||||
strlen (MOVE_CURSOR_SEQUNCE(row,column)));
|
||||
char *sequence;
|
||||
|
||||
sequence = NULL;
|
||||
asprintf (&sequence, MOVE_CURSOR_SEQUNCE, row, column);
|
||||
write (window->tty_fd, sequence, strlen (sequence));
|
||||
free (sequence);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue