summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index a2bd29994..0d3d234d9 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -2078,19 +2078,19 @@ do_print:
/* Stop here if we reached the conversion limit. */
if (len >= CONVERT_LIMIT)
return found + trunc_buf.len;
+ /* If we output something and now x is at the left
+ * column, it means that we just output to the last column.
+ * In this case we can pretend we are still in the original
+ * line and swallow the next character if it is a newline,
+ * or a newline followed by a carriage return.
+ */
+ {
+ int x, y;
+ cursor_get (&x, &y);
+ con.eat_newline = (x == 0);
+ }
}
- /* If we output something and now x is at the left
- * column, it means that we just output to the last column.
- * In this case we can pretend we are still in the original
- * line and swallow the next character if it is a newline,
- * or a newline followed by a carriage return.
- */
- {
- int x, y;
- cursor_get (&x, &y);
- con.eat_newline = (x == 0);
- }
/* If there's still something in the src buffer, but it's not a truncated
multibyte sequence, then we stumbled over a control character or an
invalid multibyte sequence. Print it. */