mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
DEL key
This commit is contained in:
parent
2d8c21b3ec
commit
82d7a1d273
@ -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)--;
|
||||
|
Loading…
Reference in New Issue
Block a user