Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lc7uB-0004mW-DS for mharc-grub-devel@gnu.org; Thu, 29 Apr 2021 10:44:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc7u7-0004kw-Uy for grub-devel@gnu.org; Thu, 29 Apr 2021 10:44:35 -0400 Received: from air.basealt.ru ([194.107.17.39]:53390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc7u5-0005ys-Mf for grub-devel@gnu.org; Thu, 29 Apr 2021 10:44:35 -0400 Received: by air.basealt.ru (Postfix, from userid 490) id 1A29C58951E; Thu, 29 Apr 2021 14:44:30 +0000 (UTC) Received: from EGORI-MACHINE.malta.altlinux.ru (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 60A53589438 for ; Thu, 29 Apr 2021 14:44:28 +0000 (UTC) From: Egor Ignatov To: grub-devel@gnu.org Subject: [PATCH] Fix backspace in the username login prompt Date: Thu, 29 Apr 2021 17:43:48 +0300 Message-Id: <20210429144348.7950-1-egori@altlinux.org> X-Mailer: git-send-email 2.29.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.107.17.39; envelope-from=egori@altlinux.org; helo=air.basealt.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 14:44:36 -0000 This patch fixes an old bug when backspace key does not work in the username login prompt. It allows BIDI type BN characters (control chars like '\b') in the visual line. And when grub_gfxterm_putchar recieves this line it successfully processes backspace. Signed-off-by: Egor Ignatov --- Hi, I'd like to try to propose this patch again. I'm new to the open source community, so any feedback and suggestions will be appreciated. grub/grub-core/normal/charset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub/grub-core/normal/charset.c b/grub/grub-core/normal/charset.c index b0ab47d73..30e819bdf 100644 --- a/grub/grub-core/normal/charset.c +++ b/grub/grub-core/normal/charset.c @@ -925,6 +925,7 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t *logical, pop_stack (); break; case GRUB_BIDI_TYPE_BN: + visual_len++; break; case GRUB_BIDI_TYPE_R: case GRUB_BIDI_TYPE_AL: -- 2.25.4