From eab0fd808cb94abb8c32798fe69327ced3380c7a Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Mon, 1 Aug 2005 03:05:53 +0000
Subject: [PATCH] the old assert is actually needed, so put it back too

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

diff --git a/ChangeLog b/ChangeLog
index b3f3e1e6..d41657ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -273,8 +273,6 @@ CVS code -
 	  that there's more room for other things, and to not display
 	  the status when we're in the file browser, since Pico doesn't.
 	  (DLR)
-  do_cursorpos()
-	- Remove unneeded assert. (DLR)
 - configure.ac:
 	- Since we only use vsnprintf() now, remove the tests for
 	  snprintf(). (DLR)
diff --git a/src/winio.c b/src/winio.c
index 236e5f2a..becae91c 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3844,7 +3844,7 @@ void do_cursorpos(bool constant)
 
     /* Check whether totsize is correct.  If it isn't, there is a bug
      * somewhere. */
-    assert(i == openfile->totsize);
+    assert(openfile->current != openfile->filebot || i == totsize);
 
     if (constant && disable_cursorpos) {
 	disable_cursorpos = FALSE;
-- 
GitLab