commit bd0b3cd39bff4229d41d70615a2b5e9056c4bf0d
parent eba0711939190efd1c4749384cf904c7b3d00d03
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 16 Nov 2005 04:41:31 +0000
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
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git 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
@@ -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) {