commit f20298dc4aefdb7bc00ea812452c462d4c66460a
parent 17ee4196f47f525a7d1874aeb23699dd80e20fde
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Tue, 29 Oct 2019 16:12:35 -0700
client: Update rl_point to last known position
Keep cursor's position consistent when passphrase is reaching
its maximum by adding characters in the middle of the string
The use case is very rare as not many people will attempt to
modify the masked passphrase from the middle.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/display.c b/client/display.c
@@ -408,7 +408,9 @@ static void mask_input(void)
return;
if (rl_end > MAX_PASSPHRASE_LEN) {
- rl_point = rl_end = MAX_PASSPHRASE_LEN;
+ rl_end = MAX_PASSPHRASE_LEN;
+ rl_point = masked_input.point;
+
goto set_mask;
}