Commit 653a5a3a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

tweak do_justify() to rely on fileage instead of NULL for its check to

detect the top of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
...@@ -48,8 +48,8 @@ CVS code - ...@@ -48,8 +48,8 @@ CVS code -
file. Changes to cut_line(), cut_to_eol(), do_page_up(), file. Changes to cut_line(), cut_to_eol(), do_page_up(),
do_page_down(), do_para_end(), do_next_word(), do_prev_word(), do_page_down(), do_para_end(), do_next_word(), do_prev_word(),
do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(), do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(),
do_gotolinecolumn(), do_delete(), begpar(), and do_gotolinecolumn(), do_delete(), begpar(), find_paragraph(),
find_paragraph(). (DLR) and do_justify(). (DLR)
- Add new -L/--nonewlines command line option, and new - Add new -L/--nonewlines command line option, and new
"nonewlines" rcfile option, to control whether nano adds "nonewlines" rcfile option, to control whether nano adds
magiclines to the ends of files. Changes to read_file(), magiclines to the ends of files. Changes to read_file(),
......
...@@ -1409,7 +1409,7 @@ void do_justify(bool full_justify) ...@@ -1409,7 +1409,7 @@ void do_justify(bool full_justify)
* something). */ * something). */
last_par_line = openfile->current; last_par_line = openfile->current;
if (first_par_line != NULL) { if (first_par_line != NULL) {
if (first_par_line->prev == NULL) if (first_par_line == openfile->fileage)
openfile->fileage = first_par_line; openfile->fileage = first_par_line;
renumber(first_par_line); renumber(first_par_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