From: David Lawrence Ramsey Date: Wed, 16 Nov 2005 04:41:31 +0000 (+0000) Subject: in do_justify(), don't save current_y and restore it if the user X-Git-Tag: v1.3.10~57 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bd0b3cd39bff4229d41d70615a2b5e9056c4bf0d;p=nano.git in 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 git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- 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) {