]> git.wh0rd.org Git - nano.git/commitdiff
make do_statusbar_cut_text() respect the CUT_TO_END flag
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 14 Jan 2005 21:10:14 +0000 (21:10 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 14 Jan 2005 21:10:14 +0000 (21:10 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/winio.c

index 601d6d401e4c5bb89fbedac4dc01b6d528f5f204..faa15adfd7308243b48d834911f5edd390885315 100644 (file)
@@ -1875,9 +1875,14 @@ void do_statusbar_delete(void)
 
 void do_statusbar_cut_text(void)
 {
-    null_at(&answer, 0);
-    statusbar_x = 0;
-    statusbar_xend = 0;
+    if (ISSET(CUT_TO_END)) {
+       null_at(&answer, statusbar_x);
+       statusbar_xend = statusbar_x;
+    } else {
+       null_at(&answer, 0);
+       statusbar_x = 0;
+       statusbar_xend = 0;
+    }
 }
 
 void do_statusbar_verbatim_input(bool *got_enter)