billiob pushed a commit to branch master.

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

commit 864fa1e368633f783dd82bb85d8ee63046c8e05e
Author: Boris Faure <[email protected]>
Date:   Wed Jan 29 22:57:49 2014 +0100

    set IUTF8 flag. Closes T656
---
 src/bin/termpty.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 0fcd6f5..21f6a53 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -277,6 +277,7 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const 
char *cd,
    Termpty *ty;
    const char *pty;
    int mode;
+   struct termios t;
 
    ty = calloc(1, sizeof(Termpty));
    if (!ty) return NULL;
@@ -338,22 +339,13 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const 
char *cd,
            goto err;
         }
 
-   if (erase_is_del)
-     {
-        struct termios t;
 
-        tcgetattr(ty->fd, &t);
-        t.c_cc[VERASE] = 0x7f;
-        tcsetattr(ty->fd, TCSANOW, &t);
-     }
-   else
-     {
-        struct termios t;
-
-        tcgetattr(ty->fd, &t);
-        t.c_cc[VERASE] = 0x8;
-        tcsetattr(ty->fd, TCSANOW, &t);
-     }
+   tcgetattr(ty->fd, &t);
+   t.c_cc[VERASE] =  (erase_is_del) ? 0x7f : 0x8;
+#ifdef IUTF8
+   t.c_iflag |= IUTF8;
+#endif
+   tcsetattr(ty->fd, TCSANOW, &t);
 
    ty->hand_exe_exit = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
                                                _cb_exe_exit, ty);

-- 


Reply via email to