Commit d72bdf17 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
parent 9c1fef04
Showing with 5 additions and 2 deletions
+5 -2
...@@ -5,6 +5,9 @@ CVS code - ...@@ -5,6 +5,9 @@ CVS code -
shortcut_init() shortcut_init()
- Simplify wording of nano_gotoline_msg. (Jordi) - Simplify wording of nano_gotoline_msg. (Jordi)
- nano.c: - nano.c:
renumber()
- When renumbering, properly use a ssize_t instead of an int.
(DLR)
do_verbatim_input() do_verbatim_input()
- If constant cursor position display is on when we finish, make - If constant cursor position display is on when we finish, make
sure the cursor position is displayed properly. (DLR) sure the cursor position is displayed properly. (DLR)
......
...@@ -967,12 +967,12 @@ void renumber(filestruct *fileptr) ...@@ -967,12 +967,12 @@ void renumber(filestruct *fileptr)
if (fileptr == NULL || fileptr->prev == NULL || fileptr == fileage) if (fileptr == NULL || fileptr->prev == NULL || fileptr == fileage)
renumber_all(); renumber_all();
else { else {
int lineno = fileptr->prev->lineno; ssize_t line = fileptr->prev->lineno;
assert(fileptr != fileptr->next); assert(fileptr != fileptr->next);
for (; fileptr != NULL; fileptr = fileptr->next) for (; fileptr != NULL; fileptr = fileptr->next)
fileptr->lineno = ++lineno; fileptr->lineno = ++line;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment