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;
|
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)--;
|
||||||
|
Loading…
Reference in New Issue
Block a user