Malformed paste on Cmder/ConEmu #280

Closed
opened 2026-01-30 21:47:52 +00:00 by claunia · 8 comments
Owner

Originally created by @Apjue on GitHub (May 23, 2018).

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [version 10.0.17134.48]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

(I am using Cmder v1.3.5, itself being a wrapper around ConEmu)
I'm copying some text into a bash.exe tab, for example dircolors --print-database > ~/.mydircolors and pasting it into Cmder

  • What's wrong / what should be happening instead:

The paste is malformed, for example I only have dircolors when pasting the command above
This problem only occurs when using bash.exe in Cmder, when using wslbridge* the paste is okay

*: This is wslbridge task command:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt

(See also https://github.com/Maximus5/ConEmu/issues/1314)

When pasting the same text into bash.exe without Cmder (standard windows's cmd), everything is fine
I don't know if I should create the issue here or on ConEmu's github, but the issue I linked is a bit dead

I can use wslbridge task (the "connector") but it behaves weirdly, I would like to stay with bash

Originally created by @Apjue on GitHub (May 23, 2018). * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [version 10.0.17134.48] * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) (I am using Cmder v1.3.5, itself being a wrapper around ConEmu) I'm copying some text into a bash.exe tab, for example `dircolors --print-database > ~/.mydircolors` and pasting it into Cmder * What's wrong / what should be happening instead: The paste is malformed, for example I only have `dircolors` when pasting the command above This problem only occurs when using bash.exe in Cmder, when using wslbridge* the paste is okay *: This is wslbridge task command: ` set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt ` (See also https://github.com/Maximus5/ConEmu/issues/1314) When pasting the same text into bash.exe without Cmder (standard windows's cmd), everything is fine I don't know if I should create the issue here or on ConEmu's github, but the issue I linked is a bit dead I can use wslbridge task (the "connector") but it behaves weirdly, I would like to stay with bash
claunia added the Product-ConhostIssue-BugResolution-ExternalArea-Interaction labels 2026-01-30 21:47:52 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 23, 2018):

When pasting the same text into bash.exe without Cmder (standard windows's cmd), everything is fine

Then this definitely sounds like an issue with ConEmu then :) I'd follow up either on that issue or file a new one on the conemu repo, whetever's in line with their contribution policies.

@zadjii-msft commented on GitHub (May 23, 2018): > When pasting the same text into bash.exe without Cmder (standard windows's cmd), everything is fine Then this definitely sounds like an issue with ConEmu then :) I'd follow up either on that issue or file a new one on the conemu repo, whetever's in line with their contribution policies.
Author
Owner

@Maximus5 commented on GitHub (May 23, 2018):

It's not a ConEmu issue, but definitely a conhost and WinAPI problem.
I've reported this several times by mail to console team but it's still there.

Brief:

  1. ConEmu calls WriteConsoleInput to put text into conhost input buffer. There is no another way to do that.
  2. I don't know what does WSL/Bash, but when it runs directly in ConEmu (without wslbridge) input is always malformed.

With connector - everything is OK.
ConEmu uses the same method to transfer text.
I see only one conclusion from these facts.

@Maximus5 commented on GitHub (May 23, 2018): It's not a ConEmu issue, but definitely a conhost and WinAPI problem. I've reported this several times by mail to console team but it's still there. Brief: 1. ConEmu calls WriteConsoleInput to put text into conhost input buffer. There is no another way to do that. 2. I don't know what does WSL/Bash, but when it runs directly in ConEmu (without wslbridge) input is *always* malformed. With connector - everything is OK. ConEmu uses the same method to transfer text. I see only one conclusion from these facts.
Author
Owner

@miniksa commented on GitHub (May 23, 2018):

@Maximus5, can you bump the mail thread? I'm sorry if you sent it to us in mail and we lost track of it.

@miniksa commented on GitHub (May 23, 2018): @Maximus5, can you bump the mail thread? I'm sorry if you sent it to us in mail and we lost track of it.
Author
Owner

@miniksa commented on GitHub (May 23, 2018):

I think I found the mail thread. Is this Maximus5/ConEmu#760? I think I filed that as MSFT:8105691.
It is still on our backlog, we just haven't had time for it yet.

@miniksa commented on GitHub (May 23, 2018): I think I found the mail thread. Is this Maximus5/ConEmu#760? I think I filed that as MSFT:8105691. It is still on our backlog, we just haven't had time for it yet.
Author
Owner

@Maximus5 commented on GitHub (May 23, 2018):

I'm really sorry, but I just realised that @S6066 uses old ConEmu build (18.02.06).
And there was fixed issue https://github.com/Maximus5/ConEmu/issues/1545.
Malformed output was result of immediate reject from WriteConsoleInput if any item from lpBuffer has EventType=0.
Perhaps, this issue should be closed indeed.

@Maximus5 commented on GitHub (May 23, 2018): I'm really sorry, but I just realised that @S6066 uses old ConEmu build (18.02.06). And there was fixed issue https://github.com/Maximus5/ConEmu/issues/1545. Malformed output was result of immediate reject from WriteConsoleInput if any item from lpBuffer has EventType=0. Perhaps, this issue should be closed indeed.
Author
Owner

@Apjue commented on GitHub (May 24, 2018):

I should have updated before creating the issues, sorry.
Does it mean it can be closed?

Edit: The issue no longer reproduces

@Apjue commented on GitHub (May 24, 2018): I should have updated before creating the issues, sorry. Does it mean it can be closed? Edit: The issue no longer reproduces
Author
Owner

@DHowett commented on GitHub (May 25, 2018):

If you've updated and the issue no longer reproduces, then yes.

@DHowett commented on GitHub (May 25, 2018): If you've updated and the issue no longer reproduces, then yes.
Author
Owner

@miniksa commented on GitHub (May 18, 2019):

Closing as this appears to have solved itself over time.

@miniksa commented on GitHub (May 18, 2019): Closing as this appears to have solved itself over time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#280