]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
ShellPkg: Added the Ctrl based hot key and changed text editor's UI.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditStatusBar.c
index 3fd604d818aac5d6e299e10eb707e68df0ff8e12..6722b7ae8168dc00145ce3d2f0feff8ace368bab 100644 (file)
@@ -120,27 +120,36 @@ StatusBarRefresh (
   //\r
   // clear status bar\r
   //\r
-  EditorClearLine (LastRow - 3, LastCol, LastRow);\r
+  EditorClearLine (LastRow, LastCol, LastRow);\r
 \r
   //\r
   // print row, column fields\r
   //\r
-  ShellPrintEx (\r
-    0,\r
-    (INT32)(LastRow) - 4,\r
-    L"  Row: %d  Col: %d       %s",\r
-    FileRow,\r
-    FileCol,\r
-    StatusString\r
-    );\r
+  if (FileRow != (UINTN)(-1) && FileCol != (UINTN)(-1)) {\r
+    ShellPrintEx (\r
+      0,\r
+      (INT32)(LastRow) - 1,\r
+      L" %d,%d       %s",\r
+      FileRow,\r
+      FileCol,\r
+      StatusString\r
+      );\r
+  } else {\r
+    ShellPrintEx (\r
+      0,\r
+      (INT32)(LastRow) - 1,\r
+      L"  %s",\r
+      StatusString\r
+      );\r
+  }\r
 \r
   //\r
   // print insert mode field\r
   //\r
   if (InsertMode) {\r
-    ShellPrintEx ((INT32)(LastCol) - 10, (INT32)(LastRow) - 4, L"|%s|", L"INS");\r
+    ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s|   Help: Ctrl-E", L"INS");\r
   } else {\r
-    ShellPrintEx ((INT32)(LastCol) - 10, (INT32)(LastRow) - 4, L"|%s|", L"OVR");\r
+    ShellPrintEx ((INT32)(LastCol) - 21, (INT32)(LastRow) - 1, L"|%s|   Help: Ctrl-E", L"OVR");\r
   }\r
   //\r
   // restore the old screen attributes\r