diff --git a/ChangeLog b/ChangeLog index a633f935..5cdd81c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -163,6 +163,11 @@ CVS code - text is copied and so can be used instead of the old return value. (DLR) - Remove unused quote_len parameter. (DLR) + do_justify() + - Don't save current_y and restore it if the user unjustifies, + as the reset_cursor() called by edit_refresh() after restoring + edittop and current will ensure that current_y is restored to + its original value. (DLR) do_alt_speller() - Move the code that replaces the text of the current file with the text of the spell-checked file into its own function, diff --git a/src/text.c b/src/text.c index 6724ea17..e91e899a 100644 --- a/src/text.c +++ b/src/text.c @@ -1132,7 +1132,6 @@ void do_justify(bool full_justify) filestruct *current_save = openfile->current; size_t current_x_save = openfile->current_x; size_t pww_save = openfile->placewewant; - ssize_t current_y_save = openfile->current_y; size_t totsize_save = openfile->totsize; #ifndef NANO_TINY filestruct *mark_begin_save = openfile->mark_begin; @@ -1472,7 +1471,6 @@ void do_justify(bool full_justify) openfile->current = current_save; openfile->current_x = current_x_save; openfile->placewewant = pww_save; - openfile->current_y = current_y_save; openfile->totsize = totsize_save; #ifndef NANO_TINY if (openfile->mark_set) {