revert change to edit_update(), since it's used when fileage may be

temporarily out of range, and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-11-10 05:20:25 +00:00
parent e99223dd25
commit b885c9c5e9
3 changed files with 4 additions and 4 deletions

View File

@ -49,8 +49,8 @@ CVS code -
do_page_down(), do_para_end(), do_next_word(), do_prev_word(),
do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(),
do_gotolinecolumn(), do_delete(), begpar(), find_paragraph(),
do_justify(), do_wrap(), remove_magicline(), edit_scroll(),
and edit_update(). (DLR)
do_justify(), do_wrap(), remove_magicline(), and
edit_scroll(). (DLR)
- Add new -L/--nonewlines command line option, and new
"nonewlines" rcfile option, to control whether nano adds
magiclines to the ends of files. Changes to read_file(),

View File

@ -1372,7 +1372,7 @@ void do_justify(bool full_justify)
null_at(&openfile->current->data, break_pos);
/* If the current line is the last line of the file, move
* the last line of the file down. */
* the last line of the file down to the next line. */
if (openfile->filebot == openfile->current)
openfile->filebot = openfile->filebot->next;

View File

@ -2842,7 +2842,7 @@ void edit_update(update_type location)
goal = editwinrows - 1;
}
for (; goal > 0 && foo != openfile->edittop; goal--)
for (; goal > 0 && foo->prev != NULL; goal--)
foo = foo->prev;
openfile->edittop = foo;