mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Delete in middle of input
This commit is contained in:
parent
15a87f0abb
commit
2d8c21b3ec
@ -196,8 +196,8 @@ static int _handle_edit(const int ch, char *input, int *size)
|
|||||||
(*size)--;
|
(*size)--;
|
||||||
|
|
||||||
// if in middle, delete and shift chars left
|
// if in middle, delete and shift chars left
|
||||||
} else if (inp_x > 1 && inp_x <= *size) {
|
} else if (inp_x > 0 && inp_x < *size) {
|
||||||
for (i = inp_x-1; i < *size; i++)
|
for (i = inp_x; i < *size; i++)
|
||||||
input[i-1] = input[i];
|
input[i-1] = input[i];
|
||||||
(*size)--;
|
(*size)--;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user