diff --git a/clewn/debugger.py b/clewn/debugger.py
--- a/clewn/debugger.py
+++ b/clewn/debugger.py
@@ -187,21 +187,6 @@
 FUNCTION_CONSOLE = """
 " Split a window and display a buffer with previewheight.
 function s:winsplit(bufname, location)
-    if a:location == "none"
-        return
-    endif
-
-    " The console window does not exist
-    if bufwinnr(a:bufname) == -1
-        call s:split(a:bufname, a:location)
-    " Split the console window (when the only window)
-    " this is required to prevent Vim display toggling between
-    " clewn console and the last buffer where the cursor was
-    " positionned (clewn does not know that this buffer is not
-    " anymore displayed)
-    elseif winnr("$") == 1
-        call s:split("", a:location)
-    endif
 endfunction
 
 """
diff --git a/clewn/netbeans.py b/clewn/netbeans.py
--- a/clewn/netbeans.py
+++ b/clewn/netbeans.py
@@ -384,7 +384,8 @@
                 self.timed_out = True
             self.timeout_str = ''
 
-            ClewnBuffer.append(self, self.buffer)
+            sys.stdout.write(self.buffer)
+            sys.stdout.flush()
             self.buffer = ''
             if self.count:
                 self.clear(self.count)
diff --git a/clewn/tty.py b/clewn/tty.py
--- a/clewn/tty.py
+++ b/clewn/tty.py
@@ -199,7 +199,6 @@
         attr[3] &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN)
         attr[6][VMIN] = 1
         attr[6][VTIME] = 0
-        tcsetattr(stdin_fd, TCSADRAIN, attr)
 
     def close(self):
         """Restore tty attributes and close pty."""
