summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-20 20:10:45 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-20 20:10:45 +0000
commit5a2beb745f87a113bbb1db775d0450f65ceb2124 (patch)
tree328250c622664b81d4eab19b9ee0f0cc817cda71 /ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
parentf7c8bd9f9d22d3124ef30737dae2fbe49fdacd41 (diff)
downloadedk2-platforms-5a2beb745f87a113bbb1db775d0450f65ceb2124.tar.xz
ShellPkg: Added the Ctrl based hot key and changed text editor's UI.
* Add Ctrl-E hotkey for help * Add Ctrl based hotkey alternatives to function hotkeys * Don't show hotkey help on the main screen * Change the file buffer's row count for display to adjust the new screen format * Change the edit status bar location, the new edit status bar is in the last line * Change the location of the edit bar, the new edit input bar is in the last line Signed-off-by: kidzyoung reviewed-by: jcarsey reviewed-by: jljusten reviewed-by: jiang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12036 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
index 57c4a9c739..46926320a6 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
@@ -832,7 +832,7 @@ HBufferImageRefresh (
//
FStartRow = HBufferImage.LowVisibleRow;
StartRow = 2;
- EndRow = (HMainEditor.ScreenSize.Row - 4);
+ EndRow = (HMainEditor.ScreenSize.Row - 1);
}
//
// no line
@@ -1404,7 +1404,7 @@ HUnderCurrentScreen (
IN UINTN FileRow
)
{
- if (FileRow > HBufferImage.LowVisibleRow + (HMainEditor.ScreenSize.Row - 5) - 1) {
+ if (FileRow > HBufferImage.LowVisibleRow + (HMainEditor.ScreenSize.Row - 2) - 1) {
return TRUE;
}
@@ -1712,8 +1712,8 @@ HBufferImagePageDown (
//
// has next page
//
- if (HBufferImage.NumLines >= FRow + (HMainEditor.ScreenSize.Row - 5)) {
- Gap = (HMainEditor.ScreenSize.Row - 5);
+ if (HBufferImage.NumLines >= FRow + (HMainEditor.ScreenSize.Row - 2)) {
+ Gap = (HMainEditor.ScreenSize.Row - 2);
} else {
//
// MOVE CURSOR TO LAST LINE
@@ -1764,8 +1764,8 @@ HBufferImagePageUp (
//
// has previous page
//
- if (FRow > (HMainEditor.ScreenSize.Row - 5)) {
- Gap = (HMainEditor.ScreenSize.Row - 5);
+ if (FRow > (HMainEditor.ScreenSize.Row - 2)) {
+ Gap = (HMainEditor.ScreenSize.Row - 2);
} else {
//
// the first line of file will displayed on the first line of screen
@@ -2392,12 +2392,12 @@ HBufferImageAdjustMousePosition (
// check whether new mouse row position is beyond screen
// if not, adjust it
//
- if (TempY >= 2 && TempY <= (HMainEditor.ScreenSize.Row - 4)) {
+ if (TempY >= 2 && TempY <= (HMainEditor.ScreenSize.Row - 1)) {
HBufferImage.MousePosition.Row = TempY;
} else if (TempY < 2) {
HBufferImage.MousePosition.Row = 2;
- } else if (TempY > (HMainEditor.ScreenSize.Row - 4)) {
- HBufferImage.MousePosition.Row = (HMainEditor.ScreenSize.Row - 4);
+ } else if (TempY > (HMainEditor.ScreenSize.Row - 1)) {
+ HBufferImage.MousePosition.Row = (HMainEditor.ScreenSize.Row - 1);
}
}