billiob pushed a commit to branch terminology-0.9.

http://git.enlightenment.org/apps/terminology.git/commit/?id=a31782c720fc35e2fb5aeab738e5a2d7de2b52a2

commit a31782c720fc35e2fb5aeab738e5a2d7de2b52a2
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Sep 13 23:15:07 2015 +0200

    termpty: fix resizing
    
    do not add a useless newline
    do not copy the same content few times
---
 src/bin/termpty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 73c76e9..ef1bc87 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -947,6 +947,7 @@ _termpty_line_rewrap(Termpty *ty, Termcell *cells, int len,
           }
         len -= copy_width;
         si->x += copy_width;
+        cells += copy_width;
         if (si->x >= si->w)
           {
              si->y++;
@@ -954,7 +955,7 @@ _termpty_line_rewrap(Termpty *ty, Termcell *cells, int len,
           }
         _check_screen_info(ty, si);
      }
-   if (!autowrapped)
+   if (!autowrapped && si->x != 0)
      {
         si->y++;
         si->x = 0;

-- 


Reply via email to