From ae064bf25566fbb3715759a0c1735ce9a49c4dc3 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 1 Jun 2004 20:38:00 +0000 Subject: [PATCH] don't rely on the return value of curs_set(), as it's broken on e.g. slang; instead, explicitly turn the cursor off where we need to git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 ++++- src/files.c | 1 + src/winio.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc5976c3..6eb75ad7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -371,7 +371,10 @@ CVS code - do_help() - Overhaul for efficiency, and allow scrolling through the help via the arrow keys as well as the paging keys. (David - Benbennick) + Benbennick) DLR: Revert the use of the return value of + curs_set() to restore the previous state of the cursor, as + some curses implementations (including slang) get it wrong, + and explicitly turn the cursor off where needed instead. do_credits() - Use napms() instead of nanosleep(), as it does the same thing (aside from taking an argument in milliseconds instead of diff --git a/src/files.c b/src/files.c index f1588a3a..defdd209 100644 --- a/src/files.c +++ b/src/files.c @@ -2683,6 +2683,7 @@ char *do_browser(const char *inpath) case NANO_HELP_FKEY: case '?': /* Pico compatibility */ do_help(); + curs_set(0); break; case NANO_ENTER_KEY: case 'S': /* Pico compatibility */ diff --git a/src/winio.c b/src/winio.c index 2c09e5ba..cd129db9 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3022,13 +3022,13 @@ int do_help(void) int kbinput = ERR, meta_key; int old_no_help = ISSET(NO_HELP); - int old_cursor = curs_set(0); #ifndef DISABLE_MOUSE const shortcut *oldshortcut = currshortcut; /* We will set currshortcut to allow clicking on the help screen shortcut list. */ #endif + curs_set(0); blank_edit(); wattroff(bottomwin, A_REVERSE); blank_statusbar(); @@ -3127,7 +3127,7 @@ int do_help(void) } else bottombars(currshortcut); - curs_set(old_cursor); + curs_set(1); edit_refresh(); /* The help_init() at the beginning allocated help_text, which has -- 2.39.5