mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 18:16:22 +00:00
DEL key
This commit is contained in:
@@ -210,12 +210,12 @@ static int _handle_edit(const int ch, char *input, int *size)
|
||||
return 1;
|
||||
|
||||
case KEY_DC: // DEL
|
||||
if (inp_x <= *size) {
|
||||
if (inp_x < *size) {
|
||||
wdelch(inp_win);
|
||||
|
||||
// if not last char, shift chars left
|
||||
if (inp_x < *size)
|
||||
for (i = inp_x-1; i < *size; i++)
|
||||
if (inp_x < *size - 1)
|
||||
for (i = inp_x; i < *size; i++)
|
||||
input[i] = input[i+1];
|
||||
|
||||
(*size)--;
|
||||
|
||||
Reference in New Issue
Block a user