1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 03:56:45 +02:00

redesign text input field to scroll horizontally, increase max string size

This commit is contained in:
Jfreegman
2014-06-20 23:08:13 -04:00
parent 3e797db16e
commit 9f4248b1e1
7 changed files with 94 additions and 56 deletions

View File

@ -226,9 +226,8 @@ int valid_nick(uint8_t *nick)
/* 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);
int new_x = len < max_x ? len : len % max_x;
wmove(w, max_y - CURS_Y_OFFSET, new_x);
}
/* gets base file name from path or original file name if no path is supplied */