CLion moving space into new line

Answered

When using printf with a space at the end of the string such as this:

and running it:

it transfers the space to the start of the next line that's printed.

This happens only in the Run tab and works normally when run from the Terminal tab

Any help appreciated!

3 comments
Comment actions Permalink

Hi! Are you on Windows? Do you use MinGW?

0
Comment actions Permalink

Yes, I use Windows 10 Pro x64 and here's my toolchains:

0
Comment actions Permalink

There are some problems with displaying the output in case of MinGW, for example, https://youtrack.jetbrains.com/issue/CPP-17579 or https://youtrack.jetbrains.com/issue/CPP-3787. Feel free to comment or upvote in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

You can try disabling PTY (Help | Find Action > type "Registry" > open Registry > find and disable the run.processes.with.pty option) or consider using Cygwin.

1

Please sign in to leave a comment.