1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
This commit is contained in:
James Booth 2012-07-08 02:56:14 +01:00
parent 2d8c21b3ec
commit 82d7a1d273

View File

@ -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)--;