From 7044489c76afc185377741cc47b0323acde0c149 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 7 Jan 2001 23:02:02 +0000 Subject: [PATCH] do_help: Do the bottom window the right wrong way if NO_HELP is set git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@457 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ proto.h | 1 + winio.c | 18 ++++++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03db3057..800482a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,9 @@ General - - Spell Erik Andersen's name right. titlebar() - Now takes an arg, needed for browser function. + do_help() + - Changed way of temporarily bringing up shortcuts at the + bottom in the help screen (actually works). - utils.c: mallocstrcpy() - Takes char pointers now instead of void (makes debugging a diff --git a/proto.h b/proto.h index c9709701..93ad7340 100644 --- a/proto.h +++ b/proto.h @@ -139,6 +139,7 @@ void replace_abort(void); void add_to_cutbuffer(filestruct * inptr); void do_replace_highlight(int highlight_flag, char *word); void nano_disabled_msg(void); +void window_init(void); #ifdef NANO_EXTRA void do_credits(void); #endif diff --git a/winio.c b/winio.c index 2b6f4a48..e10d5cb4 100644 --- a/winio.c +++ b/winio.c @@ -1191,13 +1191,13 @@ int do_help(void) if (ISSET(NO_HELP)) { + /* Well if we're going to do this, we should at least + do it the right way */ no_help_flag = 1; - delwin(bottomwin); - bottomwin = newwin(3, COLS, LINES - 3, 0); - - editwinrows -= no_help(); UNSET(NO_HELP); + window_init(); bottombars(help_list, HELP_LIST_LEN); + } else bottombars(help_list, HELP_LIST_LEN); @@ -1273,14 +1273,12 @@ int do_help(void) kbinput != NANO_EXIT_FKEY); if (no_help_flag) { - werase(bottomwin); + blank_bottombars(); wrefresh(bottomwin); - delwin(bottomwin); SET(NO_HELP); - bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0); - editwinrows += no_help(); - } else - display_main_list(); + window_init(); + } + display_main_list(); curs_set(1); edit_refresh(); -- 2.39.5