ConEmu build: 161206 x64
OS version: Windows 10 x64
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): bash
Sometimes when I paste something, the command line gets limited and when it hits the limit, it starts from left.
I sadly have no clue how to reproduce this, since this only happens sometimes and I didn't find out why yet.


Do you use connector? If you don't, you shall report the problem to Microsoft.
I was not able to reproduce this in bash itself yet.
Either it seems to happen while I'm ssh connected to another server or it's one of my start parameters:
"C:\Program Files\ConEmu\ConEmu64.exe" -Reuse -run {bash} -c "ssh !U@!@ -p !# -t 'cd \"!/\" ; /bin/bash'" -new_console:p:t:"!N"
I'll try to investigate it further and report back.
Reveal the RealConsole, set focus into it and try to paste there.
@Maximus5 The "RealConsole" actually fixes it.
It seems that sometimes (after pasting?) .. for whatever reason .. the RealConsole window gets resized, while ConEmu stays in position - causing this weird issue @jerone and me are facing.
Have a look at this:

But I am not able to reproduce this within Bash on Ubuntu on Windows:

You must be sure ALL real console properties are THE SAME in both windows.
This also happens (sometimes?) while I drag the fullscreen conemu from one monitor to another (which gets resized during movement)
I am not able to reproduce this in the real console then.
This issue is confusing and frustrating at the same time. =(
Happens? Do you mean the pasting problem appears after you drag the ConEmu between monitors?
To summarize:
Few more questions. If the problem occurs:
@miniksa I think the problem is inside conhost. Can you check that?
I don't really understand the steps to reproduce this. If you can get a reliable set of steps, I can log a bug internally and try to figure it out.
No it's not all about the pasting stuff, I am able to reproduce without pasting at all.
I'll just look for a way to be 100% reproducible and get back to you.
Give me some time =)
At the moment I am able to reproduce this while only resizing the main window:

Bash on Ubuntu on Windows shows some similar issue, but not quite the same:

It kinda overwrites some previous lines, but it's not quite the same as while using ConEmu.
@miniksa fyi =)
I can reproduce this on my box with your steps without using ConEmu. Tried it out this morning. But oddly this only happens with the Bash window. I wonder if the shell inside the WSL environment is getting the "window resize" message and moving the cursor in response causing us to draw in the wrong spot. I can't get it to repro in CMD or Powershell. I'll have to attach a debugger to find out.
I filed MSFT: 12092729 internally for investigation. With the Windows Insider Bug Bash last week, we have a high volume of bugs right now. It might take up to a few weeks for me to get time to investigate this.
The difference may be in the API which the shell is using.
Bash (doesn't matter WSL or msys/cygwin) reads keypresses one-by-one. But cmd uses ReadConsole which does not return to user mode until Enter.
OK, I got some time to look at this and figured a few things out.
Thanks for your patience with this and thank you for reporting this issue!
--Michael
Thanks, Michael!
Is there a way to disable reflowing from ConEmu? It's nice to retail upper buffer contents, which is irreversible cropped otherwise, but it cause problems.
As an alternative, I think about software reflowing implemented by ConEmu or reflowing only invisible part of the buffer.
Hi Maximus,
There's not currently a way to programmatically adjust the reflowing setting. You can adjust it with the LineWrap REG_DWORD key under HKCU console before starting a console session (for those that load from the registry), or you can UI automate it off the property sheet... but there's no API or anything nice like that right now. :(
We have some people trying to figure out a comprehensive update to our settings story and exposing the difficult-to-set-settings is one of the things included in it, but I have no promises on timeline.
Sorry it's so obtuse. You might have to resort to a creative workaround in the meantime.
Thanks,
--Michael
Hi,
It looks like fix is already there:
https://github.com/Microsoft/BashOnWindows/issues/1001
But this is still reproducible in 100% of time for me.
I would also like to note that cmd and PowerShell are ok - resizing works as expected.
I had this happen to me because of something completely unrelated. This might not help but if your setting your PS1-PS4 make sure any non-printable characters (like color changes ) are surounded with \[ and \]. Hope this isn't just useless spam.
I close this as external issue.
Also, I think if you use wslbridge+connector you'd not see the issue.
@Maximus5 We have two closed issues both stating that the problem is on the other side
@nick4fake Yes. It's conhost problem.
Most helpful comment
OK, I got some time to look at this and figured a few things out.
Thanks for your patience with this and thank you for reporting this issue!
--Michael