From daaf468c937deab64554eb439d42b170c87b789e Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Sat, 28 Nov 2009 03:01:30 +0000
Subject: [PATCH] 2009-11-27 Chris Allegretta <chrisa@asty.org>         *
 nano.c (do_suspend): Don't clear the screen but do move the cursor down to
 the last line           first in an effort to not corrupt the screen, which
 contradicts Pico but is consistent           with almost all other text
 editors.  Fixes Savannah bug 28110/Debian bug 460510           reported by
 Tim Connors <reportbug@rather.puzzling.org>.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog  | 6 ++++++
 src/nano.c | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 968de818..5f2dbca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-27 Chris Allegretta <chrisa@asty.org>
+	* nano.c (do_suspend): Don't clear the screen but do move the cursor down to the last line
+	  first in an effort to not corrupt the screen, which contradicts Pico but is consistent
+	  with almost all other text editors.  Fixes Savannah bug 28110/Debian bug 460510
+	  reported by Tim Connors <reportbug@rather.puzzling.org>.
+
 2009-11-26 Chris Allegretta <chrisa@asty.org>
 	* winio.c (edit_scroll): Adjust for long lines when scrolling.
 	* rcfile.c (parse_rcfile), initialize size argument to getline(), fixes crash on FreeBSD 
diff --git a/src/nano.c b/src/nano.c
index a1c6dc0e..056f2c43 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1186,9 +1186,8 @@ RETSIGTYPE do_suspend(int signal)
 
     /* Blank the screen, and move the cursor to the last line of the
      * screen. */
-    erase();
     move(LINES - 1, 0);
-    refresh();
+    endwin();
 
     /* Display our helpful message. */
     printf(_("Use \"fg\" to return to nano.\n"));
-- 
GitLab