This patch fixes a bug when backspace key does not work in the
username login prompt. It allows backspace characters in the BIDI
visual line. Thus grub_gfxterm_putchar receives '\b' chars that
were previously ignored.

Signed-off-by: Egor Ignatov <eg...@altlinux.org>
---
> Did you test this patch with other BIDI type BN characters [1]? I am not

You are right, I added a check to handle only backspace characters

> convinced it works with them as expected. I think earlier version of your
> patch was more promising...

Earlier versions of my patch included workaround for special case when
the password is longer than one line. This scenario is not very
realistic and I dont think it's worth complicating the codebase.

Thank you for your response.
Let me know if you have any concerns about this version.

Egor

 grub-core/normal/charset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c
index 4dfcc3107..8e7add1f8 100644
--- a/grub-core/normal/charset.c
+++ b/grub-core/normal/charset.c
@@ -931,6 +931,8 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t 
*logical,
            pop_stack ();
            break;
          case GRUB_BIDI_TYPE_BN:
+           if (visual[visual_len].base == '\b')
+             visual_len++;
            break;
          case GRUB_BIDI_TYPE_R:
          case GRUB_BIDI_TYPE_AL:
-- 
2.29.3


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to