]> git.wh0rd.org Git - nano.git/commitdiff
in do_justify(), save placewewant, and restore it if we unjustify, in
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 28 Jun 2005 06:05:54 +0000 (06:05 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 28 Jun 2005 06:05:54 +0000 (06:05 +0000)
order to avoid a potential screen update problem

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/nano.c

index 5261319a01d223b80221b3b0d507c7ca6861578d..1bf3c0e1066fcc8ac2a51e7011a5f54896563d5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,6 +238,9 @@ CVS code -
        - If the spell-checker printed any error messages onscreen, call
          total_refresh() to make sure they're cleared off. (DLR, found
          by CHAO Wei-Lun)
+  do_justify()
+       - Save placewewant, and restore it if we unjustify, in order to
+         avoid a potential screen update problem. (DLR)
   do_output()
        - Properly allow wrapping when we insert a tab, for consistency.
          (DLR)
index a495221da0e5cddd8157cc1b8e924347a796e0b1..bf9930fa2886e57803083dd36226553efe79d1cd 100644 (file)
@@ -3146,7 +3146,7 @@ void do_justify(bool full_justify)
 
     /* We save these global variables to be restored if the user
      * unjustifies.  Note that we don't need to save totlines. */
-    size_t current_x_save = current_x;
+    size_t current_x_save = current_x, pww_save = placewewant;
     int current_y_save = current_y;
     unsigned long flags_save = flags;
     size_t totsize_save = totsize;
@@ -3419,6 +3419,7 @@ void do_justify(bool full_justify)
        /* Restore the justify we just did (ungrateful user!). */
        current = current_save;
        current_x = current_x_save;
+       placewewant = pww_save;
        current_y = current_y_save;
        edittop = edittop_save;