mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-30 08:26:45 +02:00
add line history with up/down keys
This commit is contained in:
@ -185,3 +185,11 @@ bool valid_nick(uint8_t *nick)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Moves cursor to the end of the line in given window */
|
||||
void mv_curs_end(WINDOW *w, size_t len, int max_y, int max_x)
|
||||
{
|
||||
int end_y = (len / max_x) + (max_y - CURS_Y_OFFSET);
|
||||
int end_x = len % max_x;
|
||||
wmove(w, end_y, end_x);
|
||||
}
|
Reference in New Issue
Block a user