]> git.wh0rd.org Git - nano.git/commitdiff
clean up edit_redraw() a bit
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 16 Jul 2005 02:12:18 +0000 (02:12 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 16 Jul 2005 02:12:18 +0000 (02:12 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2871 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/winio.c

index a06cb74078b09c7d8320c9ef6e13eae6e77008ed..33f450b63778032f15718a1b6d8dc28497a8e56f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -104,7 +104,7 @@ CVS code -
          the "Replace" prompt. (DLR, found by Mike Frysinger)
        - Remove unnecessary renumber(). (DLR)
 - winio.c:
-  edit_scroll(), edit_refresh()
+  edit_scroll(), edit_redraw(), edit_refresh()
        - Clean up and simplify. (DLR)
   do_statusbar_next_word()
        - Rework to be more like do_statusbar_prev_word(), to avoid a
index 8a469adfe6cd246d93d2e3161777e8fb9bdf08e1..73eaa9b7f5c07a4f3eb32cb08f624a750c6d06d3 100644 (file)
@@ -3586,15 +3586,15 @@ void edit_redraw(const filestruct *old_current, size_t old_pww)
     while (foo != openfile->current) {
        if (do_refresh)
            update_line(foo, 0);
+
 #ifndef NANO_SMALL
        if (!openfile->mark_set)
 #endif
            break;
+
 #ifndef NANO_SMALL
-       if (foo->lineno > openfile->current->lineno)
-           foo = foo->prev;
-       else
-           foo = foo->next;
+       foo = (foo->lineno > openfile->current->lineno) ? foo->prev :
+               foo->next;
 #endif
     }