1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Implemented HOME and END keys during input

This commit is contained in:
James Booth 2012-04-09 23:06:25 +01:00
parent 22dd55b154
commit 525c04d7ae

View File

@ -198,6 +198,14 @@ static int _handle_edit(const int ch, char *input, int *size)
_replace_input(input, next, size);
return 1;
case KEY_HOME:
wmove(inp_win, inp_y, 1);
return 1;
case KEY_END:
wmove(inp_win, inp_y, (*size) + 1);
return 1;
case 9: // tab
if ((strncmp(input, "/msg ", 5) == 0) && (*size > 5)) {
for(i = 5; i < *size; i++) {
@ -215,7 +223,7 @@ static int _handle_edit(const int ch, char *input, int *size)
}
}
return 1;
default:
return 0;
}