diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-20 20:10:45 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-20 20:10:45 +0000 |
commit | 5a2beb745f87a113bbb1db775d0450f65ceb2124 (patch) | |
tree | 328250c622664b81d4eab19b9ee0f0cc817cda71 /ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | |
parent | f7c8bd9f9d22d3124ef30737dae2fbe49fdacd41 (diff) | |
download | edk2-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/Edit/FileBuffer.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c index 8f7c870bb1..9a2427f4e9 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c @@ -53,7 +53,7 @@ EFI_EDITOR_FILE_BUFFER FileBufferConst = { //
// the whole edit area needs to be refreshed
//
-STATIC BOOLEAN FileBufferNeedRefresh;
+BOOLEAN FileBufferNeedRefresh;
//
// only the current line in edit area needs to be refresh
@@ -627,11 +627,11 @@ FileBufferRefresh ( Link = Link->ForwardLink;
Row++;
- } while (Link != FileBuffer.ListHead && Row <= (MainEditor.ScreenSize.Row - 4));
+ } while (Link != FileBuffer.ListHead && Row <= (MainEditor.ScreenSize.Row - 1));
//
// while not file end and not screen full
//
- while (Row <= (MainEditor.ScreenSize.Row - 4)) {
+ while (Row <= (MainEditor.ScreenSize.Row - 1)) {
EditorClearLine (Row, MainEditor.ScreenSize.Column, MainEditor.ScreenSize.Row);
Row++;
}
@@ -2300,8 +2300,8 @@ FileBufferPageDown ( //
// has next page
//
- if (FileBuffer.NumLines >= FRow + (MainEditor.ScreenSize.Row - 5)) {
- Gap = (MainEditor.ScreenSize.Row - 5);
+ if (FileBuffer.NumLines >= FRow + (MainEditor.ScreenSize.Row - 2)) {
+ Gap = (MainEditor.ScreenSize.Row - 2);
} else {
//
// MOVE CURSOR TO LAST LINE
@@ -2352,8 +2352,8 @@ FileBufferPageUp ( //
// has previous page
//
- if (FRow > (MainEditor.ScreenSize.Row - 5)) {
- Gap = (MainEditor.ScreenSize.Row - 5);
+ if (FRow > (MainEditor.ScreenSize.Row - 2)) {
+ Gap = (MainEditor.ScreenSize.Row - 2);
} else {
//
// the first line of file will displayed on the first line of screen
@@ -2575,7 +2575,7 @@ UnderCurrentScreen ( //
// if is to the under of the screen
//
- if (FileRow > FileBuffer.LowVisibleRange.Row + (MainEditor.ScreenSize.Row - 5) - 1) {
+ if (FileRow > FileBuffer.LowVisibleRange.Row + (MainEditor.ScreenSize.Row - 2) - 1) {
return TRUE;
}
@@ -3207,12 +3207,12 @@ FileBufferAdjustMousePosition ( // check whether new mouse row position is beyond screen
// if not, adjust it
//
- if (CoordinateY >= 2 && CoordinateY <= (MainEditor.ScreenSize.Row - 4)) {
+ if (CoordinateY >= 2 && CoordinateY <= (MainEditor.ScreenSize.Row - 1)) {
FileBuffer.MousePosition.Row = CoordinateY;
} else if (CoordinateY < 2) {
FileBuffer.MousePosition.Row = 2;
- } else if (CoordinateY > (MainEditor.ScreenSize.Row - 4)) {
- FileBuffer.MousePosition.Row = (MainEditor.ScreenSize.Row - 4);
+ } else if (CoordinateY > (MainEditor.ScreenSize.Row - 1)) {
+ FileBuffer.MousePosition.Row = (MainEditor.ScreenSize.Row - 1);
}
}
|