diff --git a/ChangeLog b/ChangeLog index ddeb011b1f2355f3b787578ebeebefebfb2a5a70..54aaf997aa543d4543b87d0e92b1ef1f698eb16b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-02-25 Benno Schulenberg <bensberg@justemail.net> + * src/help.c (do_help_void) - Call the help browser with the correct + refresher for afterwards. This solves a bug reported by myself on + nano-devel in August 2010: after typing ^R ^T ^W ^G ^X, the file + being edited would get displayed instead of the list of files. + 2014-02-24 Chris Allegretta <chrisa@asty.org> * new linter functionality. rcfile option "linter" * src/global.c (shortcut_init) - Actually free the sclist diff --git a/src/help.c b/src/help.c index 5cbfed4f380dcabc9ff805354e93bb5fae9f0afa..d17f5ee0a7cfd38e099931cce9990c2829a4b8d3 100644 --- a/src/help.c +++ b/src/help.c @@ -547,13 +547,15 @@ size_t help_line_len(const char *ptr) #endif /* !DISABLE_HELP */ -/* Start the help browser for the edit window. */ +/* Start the help browser. */ void do_help_void(void) { - #ifndef DISABLE_HELP - /* Start the help browser for the edit window. */ - do_help(&edit_refresh); + /* Start the help browser, with the correct refresher for afterwards. */ + if (currmenu == MBROWSER || currmenu == MWHEREISFILE || currmenu == MGOTODIR) + do_help(&browser_refresh); + else + do_help(&edit_refresh); #else if (currmenu == MMAIN) nano_disabled_msg();