From 41eabae6a6352172d7ff6ceeb89eea824a97ae15 Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Fri, 14 Oct 2005 14:20:48 +0000 Subject: [PATCH] Fix PgUp/PgDn keys in help window --- docs/notework.txt | 4 ++++ goldlib/gall/gwinhlp1.cpp | 35 ++++++++++++----------------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 27b9710..8ecf180 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,10 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fix PgUp/PgDn keys in help window (bugreport from Semen Panevin). + +- Fix "Goto Next Area?" menu hotkeys (bugreport from Semen Panevin). + + CPUID support for GNU C builds. ! GNwin and RDDTwin project files is added into MSVC6 workspace. diff --git a/goldlib/gall/gwinhlp1.cpp b/goldlib/gall/gwinhlp1.cpp index 36e2b8b..13a0e38 100644 --- a/goldlib/gall/gwinhlp1.cpp +++ b/goldlib/gall/gwinhlp1.cpp @@ -244,7 +244,7 @@ static int find_page(long startpos, int pageofs) { static void disp_cat() { - int newpage, page, wrow, wcol, end, menuopen, itemopen; + int page, wrow, wcol, end, menuopen, itemopen; long startpos; _menu_t *curr; char* p; @@ -300,16 +300,11 @@ static void disp_cat() { wmessage(" ESC ",BT_BORD,1,whelp.winattr); // if one or more cross reference menu items were specified - if(arraycnt) { - - // depending on whether there are previous - // or next pages, define the PgUp/PgDn keys - if(page) - setonkey(Key_PgUp,esc_pgup,0); - if(not end) - setonkey(Key_PgDn,esc_pgdn,0); - - // define the Esc key + if (arraycnt) + { + // define the PgUp/PgDn/Esc keys + setonkey(Key_PgUp,esc_pgup,0); + setonkey(Key_PgDn,esc_pgdn,0); setonkey(Key_Esc,esc_esc,0); // end the menu and process it @@ -319,10 +314,8 @@ static void disp_cat() { gmnudropthrough = NO; // free the keys that were defined - if(page) - setonkey(Key_PgUp,NULL,0); - if(not end) - setonkey(Key_PgDn,NULL,0); + setonkey(Key_PgUp,NULL,0); + setonkey(Key_PgDn,NULL,0); setonkey(Key_Esc,NULL,0); // turn off the menuopen flag and restore menu info @@ -378,10 +371,8 @@ static void disp_cat() { // find previous page, clear help window, // and set position to upper left corner - newpage = find_page(startpos,page-1); - if(newpage==page) - break; - page=newpage; + page = find_page(startpos, page + (page ? -1 : 0)); + wrow=0; wclear(); kbclear(); @@ -391,10 +382,8 @@ static void disp_cat() { // find next page, clear help window, and // set position to upper left corner - newpage = find_page(startpos,page+1); - if(newpage==page) - break; - page=newpage; + page = find_page(startpos, page + (end ? 0 : 1)); + wrow=0; wclear(); kbclear();