summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
index 3fd604d818..ff3f465ad7 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
@@ -125,14 +125,23 @@ StatusBarRefresh (
//
// print row, column fields
//
- ShellPrintEx (
- 0,
- (INT32)(LastRow) - 4,
- L" Row: %d Col: %d %s",
- FileRow,
- FileCol,
- StatusString
- );
+ if (FileRow != (UINTN)(-1) && FileCol != (UINTN)(-1)) {
+ ShellPrintEx (
+ 0,
+ (INT32)(LastRow) - 4,
+ L" Row: %d Col: %d %s",
+ FileRow,
+ FileCol,
+ StatusString
+ );
+ } else {
+ ShellPrintEx (
+ 0,
+ (INT32)(LastRow) - 4,
+ L" %s",
+ StatusString
+ );
+ }
//
// print insert mode field