]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
ShellPkg: Fixed build error 'variable set but not used'
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditInputBar.c
index 2c74e067412f5661b965da8b17e0240f6a9c505b..649ed579558e1d7a72bd38c840a02be70a3fedc4 100644 (file)
@@ -87,18 +87,18 @@ InputBarPrintInput (
 \r
   gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
 \r
-  ShellPrintEx (((INT32)mPromptLen), ((INT32)LastRow) - 4, L"%s", Buffer);\r
+  ShellPrintEx (((INT32)mPromptLen), ((INT32)LastRow) - 1, L"%s", Buffer);\r
   Size = StrLen (Buffer);\r
 \r
   //\r
   // print " " after mPrompt\r
   //\r
   for (Index = Size; Index < Limit; Index++) {\r
-    ShellPrintEx ((INT32)(mPromptLen + Size), ((INT32)LastRow) - 4, L" ");\r
+    ShellPrintEx ((INT32)(mPromptLen + Size), ((INT32)LastRow) - 1, L" ");\r
   }\r
 \r
   gST->ConOut->EnableCursor (gST->ConOut, TRUE);\r
-  gST->ConOut->SetCursorPosition (gST->ConOut, Size + mPromptLen, LastRow - 4);\r
+  gST->ConOut->SetCursorPosition (gST->ConOut, Size + mPromptLen, LastRow - 1);\r
 }\r
 \r
 typedef struct {\r
@@ -133,8 +133,6 @@ InputBarRefresh (
   UINTN                   Size;\r
   EFI_STATUS              Status;\r
   BOOLEAN                 NoDisplay;\r
-  UINTN                   Limit;\r
-  UINTN                   mPromptLen;\r
   UINTN                   EventIndex;\r
   UINTN                   CursorRow;\r
   UINTN                   CursorCol;\r
@@ -159,17 +157,11 @@ InputBarRefresh (
   //\r
   // clear input bar\r
   //\r
-  EditorClearLine (LastRow - 3, LastColumn, LastRow);\r
+  EditorClearLine (LastRow , LastColumn, LastRow);\r
 \r
-  gST->ConOut->SetCursorPosition (gST->ConOut, 0, LastRow - 4);\r
+  gST->ConOut->SetCursorPosition (gST->ConOut, 0, LastRow - 1);\r
   ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gShellDebug1HiiHandle, mPrompt);\r
 \r
-  //\r
-  // that's the maximum input length that can be displayed on screen\r
-  //\r
-  mPromptLen = StrLen (mPrompt);\r
-  Limit     = LastColumn - mPromptLen;\r
-\r
   //\r
   // this is a selection mPrompt, cursor will stay in edit area\r
   // actually this is for search , search/replace\r