Commit 0532296a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

more miscellaneous minor fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 443a766f
Showing with 5 additions and 7 deletions
+5 -7
...@@ -96,8 +96,9 @@ CVS code - ...@@ -96,8 +96,9 @@ CVS code -
do_replace() do_replace()
- Blank out last_replace properly again just before displaying - Blank out last_replace properly again just before displaying
the "Replace" prompt. (DLR, found by Mike Frysinger) the "Replace" prompt. (DLR, found by Mike Frysinger)
- Remove unnecessary renumber(). (DLR)
- winio.c: - winio.c:
edit_scroll() edit_scroll(), edit_refresh()
- Clean up and simplify. (DLR) - Clean up and simplify. (DLR)
do_statusbar_next_word() do_statusbar_next_word()
- Rework to be more like do_statusbar_prev_word(), to avoid a - Rework to be more like do_statusbar_prev_word(), to avoid a
......
...@@ -191,7 +191,7 @@ void renumber(filestruct *fileptr) ...@@ -191,7 +191,7 @@ void renumber(filestruct *fileptr)
assert(fileptr != fileptr->next); assert(fileptr != fileptr->next);
for (; fileptr != NULL; fileptr = fileptr->next) for (; fileptr != NULL; fileptr = fileptr->next)
fileptr->lineno = line++; fileptr->lineno = ++line;
} }
/* Partition a filestruct so it begins at (top, top_x) and ends at (bot, /* Partition a filestruct so it begins at (top, top_x) and ends at (bot,
......
...@@ -956,7 +956,6 @@ void do_replace(void) ...@@ -956,7 +956,6 @@ void do_replace(void)
openfile->current_x = begin_x; openfile->current_x = begin_x;
openfile->placewewant = pww_save; openfile->placewewant = pww_save;
renumber(openfile->fileage);
edit_refresh(); edit_refresh();
if (numreplaced >= 0) if (numreplaced >= 0)
......
...@@ -3624,13 +3624,11 @@ void edit_refresh(void) ...@@ -3624,13 +3624,11 @@ void edit_refresh(void)
fprintf(stderr, "edit_refresh(): edittop->lineno = %ld\n", (long)openfile->edittop->lineno); fprintf(stderr, "edit_refresh(): edittop->lineno = %ld\n", (long)openfile->edittop->lineno);
#endif #endif
while (nlines < editwinrows) { while (nlines < editwinrows && foo != NULL) {
update_line(foo, (foo == openfile->current) ? update_line(foo, (foo == openfile->current) ?
openfile->current_x : 0); openfile->current_x : 0);
nlines++;
if (foo->next == NULL)
break;
foo = foo->next; foo = foo->next;
nlines++;
} }
while (nlines < editwinrows) { while (nlines < editwinrows) {
blank_line(edit, nlines, 0, COLS); blank_line(edit, nlines, 0, COLS);
......
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