1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -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; return 1;
case KEY_DC: // DEL case KEY_DC: // DEL
if (inp_x <= *size) { if (inp_x < *size) {
wdelch(inp_win); wdelch(inp_win);
// if not last char, shift chars left // if not last char, shift chars left
if (inp_x < *size) if (inp_x < *size - 1)
for (i = inp_x-1; i < *size; i++) for (i = inp_x; i < *size; i++)
input[i] = input[i+1]; input[i] = input[i+1];
(*size)--; (*size)--;