Add comments describing tui_ui_out and its fields, cleanup a bit
[deliverable/binutils-gdb.git] / gdb / tui / tui-io.c
index b9087737fe23464df5c439cd95c4713448507e65..ad47c8205f358806f43da07b0b92760af08a371c 100644 (file)
@@ -699,12 +699,6 @@ gdb_wgetch (WINDOW *win)
   nonl ();
   int r = wgetch (win);
   nl ();
-  /* In nonl mode, if the user types Enter, it will not be echoed
-     properly.  This will result in gdb output appearing immediately
-     after the command.  So, if we read \r, emit a \r now, after nl
-     mode has been re-entered, so that the output looks correct.  */
-  if (r == '\r')
-    puts ("\r");
   return r;
 }
 
@@ -931,7 +925,7 @@ tui_getc (FILE *fp)
 
   /* The \n must be echoed because it will not be printed by
      readline.  */
-  if (ch == '\n')
+  if (ch == '\n' || ch == '\r')
     {
       /* When hitting return with an empty input, gdb executes the last
          command.  If we emit a newline, this fills up the command window
This page took 0.023309 seconds and 4 git commands to generate.