From d72bdf17f409a321a62c25b1b80b9fae36e02804 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 8 Jul 2005 01:08:25 +0000 Subject: [PATCH] in renumber(), when renumbering, properly use a ssize_t instead of an int git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2823 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/nano.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa0fa628..15b5cf32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ CVS code - shortcut_init() - Simplify wording of nano_gotoline_msg. (Jordi) - nano.c: + renumber() + - When renumbering, properly use a ssize_t instead of an int. + (DLR) do_verbatim_input() - If constant cursor position display is on when we finish, make sure the cursor position is displayed properly. (DLR) diff --git a/src/nano.c b/src/nano.c index d21df01c..87943c2b 100644 --- a/src/nano.c +++ b/src/nano.c @@ -967,12 +967,12 @@ void renumber(filestruct *fileptr) if (fileptr == NULL || fileptr->prev == NULL || fileptr == fileage) renumber_all(); else { - int lineno = fileptr->prev->lineno; + ssize_t line = fileptr->prev->lineno; assert(fileptr != fileptr->next); for (; fileptr != NULL; fileptr = fileptr->next) - fileptr->lineno = ++lineno; + fileptr->lineno = ++line; } } -- 2.39.5