3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

client: ignore control sequence length in prompt

Readline uses the characters \001 and \002 to mark the start and end
of zero-length character sequnces in the prompt before prompt
expansion. Without these characters the input point can become offset
from the visual end of the prompt when performing some actions.
This commit is contained in:
Ronan Pigott 2020-12-10 23:32:22 -07:00 committed by Denis Kenzior
parent fde1012f5d
commit 0193940e50

View File

@ -39,7 +39,8 @@
#include "client/command.h"
#include "client/display.h"
#define IWD_PROMPT COLOR_GREEN "[iwd]" COLOR_OFF "# "
#define IWD_PROMPT \
"\001" COLOR_GREEN "\002" "[iwd]" "\001" COLOR_OFF "\002" "# "
#define LINE_LEN 81
static struct l_signal *window_change_signal;