mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 03:36:22 +00:00
Implemented HOME and END keys during input
This commit is contained in:
10
input_win.c
10
input_win.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user