Help window will not close on pressing undefined keys

This commit is contained in:
Ianos Gnatiuc 2005-10-26 21:04:05 +00:00
parent b5dc91c02d
commit 1f34df0b75
2 changed files with 25 additions and 46 deletions

View File

@ -10,6 +10,8 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
- Help window will not close on pressing undefined keys.
+ DispHdrLocation settings changed to No/Yes/Right/Center. Right == Yes. + DispHdrLocation settings changed to No/Yes/Right/Center. Right == Yes.
+ Added new macros: @pad{FAN}{T} + Added new macros: @pad{FAN}{T}

View File

@ -279,10 +279,8 @@ static void disp_cat() {
} }
// if end-of-category or new-page specified // if end-of-category or new-page specified
if((wrow > whelp.erow-1) or pagebreak or end) { if((wrow > whelp.erow-1) or pagebreak or end)
{
loop: ////////////////////////////////
const char* _help = " Help "; const char* _help = " Help ";
char _title[80]; char _title[80];
sprintf(_title, " %s ", recd.category); sprintf(_title, " %s ", recd.category);
@ -365,50 +363,29 @@ static void disp_cat() {
gkbd.inmenu = false; gkbd.inmenu = false;
} }
switch(kbch) { if ((kbch == -1) || (kbch == Key_Esc))
{
case Key_PgUp: // clear any PgUp or PgDn keystrokes that
// may be lurking in CXL's keystroke
// find previous page, clear help window, // buffer, and return to caller.
// and set position to upper left corner kbclear();
page = find_page(startpos, page + (page ? -1 : 0)); return;
wrow=0;
wclear();
kbclear();
continue;
case Key_PgDn:
// find next page, clear help window, and
// set position to upper left corner
page = find_page(startpos, page + (end ? 0 : 1));
wrow=0;
wclear();
kbclear();
continue;
case -1: // Aborted links
case Key_Esc:
// clear any PgUp or PgDn keystrokes that
// may be lurking in CXL's keystroke
// buffer, and return to caller.
kbclear();
return;
default:
if(kbch) {
kbclear();
kbput(kbch);
return;
}
} }
else
{
if (kbch == Key_PgUp)
page -= (page ? 1 : 0); // find previous page
else if (kbch == Key_PgDn)
page += (end ? 0 : 1); // find next page
// a goto statement is used here so the continue // clear help window, and set position to upper left corner
// statement above falls out to the right loop page = find_page(startpos, page);
goto loop;
wrow=0;
wclear();
kbclear();
continue;
}
} }
// search for cross reference categories on current line. // search for cross reference categories on current line.