1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

End key moves to end of pad

This commit is contained in:
James Booth 2012-07-07 22:19:01 +01:00
parent 8abba0db91
commit 78e70abc17

View File

@ -226,7 +226,7 @@ static int _handle_edit(const int ch, char *input, int *size)
return 1;
case KEY_RIGHT:
if (inp_x <= *size )
if (inp_x <= *size)
wmove(inp_win, inp_y, inp_x+1);
return 1;
@ -249,6 +249,10 @@ static int _handle_edit(const int ch, char *input, int *size)
return 1;
case KEY_END:
if (*size > cols-2) {
pad_start = ((*size) - cols) + 2;
prefresh(inp_win, 0, pad_start, rows-1, 0, rows-1, cols-1);
}
wmove(inp_win, inp_y, (*size) + 1);
return 1;