Commit 1228699f authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix renumber_all() as well as renumber()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2824 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent d72bdf17
Showing with 3 additions and 3 deletions
+3 -3
...@@ -5,7 +5,7 @@ CVS code - ...@@ -5,7 +5,7 @@ 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() renumber_all(), renumber()
- When renumbering, properly use a ssize_t instead of an int. - When renumbering, properly use a ssize_t instead of an int.
(DLR) (DLR)
do_verbatim_input() do_verbatim_input()
......
...@@ -954,12 +954,12 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot) ...@@ -954,12 +954,12 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot)
void renumber_all(void) void renumber_all(void)
{ {
filestruct *temp; filestruct *temp;
int i = 1; ssize_t line = 1;
assert(fileage == NULL || fileage != fileage->next); assert(fileage == NULL || fileage != fileage->next);
for (temp = fileage; temp != NULL; temp = temp->next) for (temp = fileage; temp != NULL; temp = temp->next)
temp->lineno = i++; temp->lineno = line++;
} }
void renumber(filestruct *fileptr) void renumber(filestruct *fileptr)
......
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