public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: gechao@greatwall.com.cn
To: dandan.bi@intel.com, eric.dong@intel.com
Cc: devel@edk2.groups.io, jian.j.wang@intel.com, hao.a.wu@intel.com,
	gechao <gechao@greatwall.com.cn>
Subject: [PATCH] MdeModulePkg/DisplayEngineDxe: Fix Help information shadow problem
Date: Mon, 28 Dec 2020 17:11:41 +0800	[thread overview]
Message-ID: <d7f8114b79f05db866180dc8017b291856d6f175.1609143528.git.gechao@greatwall.com.cn> (raw)

From: gechao <gechao@greatwall.com.cn>

Fix residual display problem in help information section with different
length string. When switching between different items, the help inform-
ation part may remain the last displayed help information content.
Example:
    Last: ABCDEFGH, New:  1234567
    Result: 1234567H

Signed-off-by: gechao <gechao@greatwall.com.cn>
---
 .../Universal/DisplayEngineDxe/FormDisplay.c  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index a3898dc2ec..abb4843a73 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -3061,6 +3061,15 @@ UiDisplayMenu (
       //
       if (!MultiHelpPage) {
         for (Index = 0; Index < HelpLine; Index++) {
+          //
+          // Clear whole line first, Clear the last displayed information.
+          //
+          PrintStringAtWithWidth (
+            gStatementDimensions.RightColumn - gHelpBlockWidth,
+            Index + TopRow,
+            gEmptyString,
+            gHelpBlockWidth
+            );
           PrintStringAtWithWidth (
             gStatementDimensions.RightColumn - gHelpBlockWidth,
             Index + TopRow,
@@ -3080,6 +3089,15 @@ UiDisplayMenu (
       } else  {
         if (HelpPageIndex == 0) {
           for (Index = 0; Index < RowCount - HelpBottomLine; Index++) {
+            //
+            // Clear whole line first, Clear the last displayed information.
+            //
+            PrintStringAtWithWidth (
+              gStatementDimensions.RightColumn - gHelpBlockWidth,
+              Index + TopRow,
+              gEmptyString,
+              gHelpBlockWidth
+              );
             PrintStringAtWithWidth (
               gStatementDimensions.RightColumn - gHelpBlockWidth,
               Index + TopRow,
@@ -3090,6 +3108,15 @@ UiDisplayMenu (
         } else {
           for (Index = 0; (Index < RowCount - HelpBottomLine - HelpHeaderLine) &&
               (Index + HelpPageIndex * (RowCount - 2) + 1 < HelpLine); Index++) {
+            //
+            // Clear whole line first, Clear the last displayed information.
+            //
+            PrintStringAtWithWidth (
+              gStatementDimensions.RightColumn - gHelpBlockWidth,
+              Index + TopRow + HelpHeaderLine,
+              gEmptyString,
+              gHelpBlockWidth
+              );
             PrintStringAtWithWidth (
               gStatementDimensions.RightColumn - gHelpBlockWidth,
               Index + TopRow + HelpHeaderLine,
-- 
2.25.1


             reply	other threads:[~2020-12-28  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28  9:11 gechao [this message]
2020-12-29  1:45 ` 回复: [edk2-devel] [PATCH] MdeModulePkg/DisplayEngineDxe: Fix Help information shadow problem gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7f8114b79f05db866180dc8017b291856d6f175.1609143528.git.gechao@greatwall.com.cn \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox