[GHC] #13329: Windows CMD.EXE "Quick Edit Mode"

#13329: Windows CMD.EXE "Quick Edit Mode" -------------------------------------+------------------------------------- Reporter: irongremlin | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: clipboard, | Operating System: Windows quick edit | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Behavior: When a compiled haskell executable launches into a windows 7 'cmd.exe' terminal session, it does not respect the users 'quick edit mode' setting, and launches with the system default setting instead. I have not replicated this issue on other versions of windows. Details: For a description of the feature behavior, see: https://blogs.msdn.microsoft.com/adioltean/2004/12/27/useful-copypaste- trick-in-cmd-exe/ The registry key entry controlling this setting is: HKEY_CURRENT_USER\Console\QuickEdit (1 == on, 0 ==off) Tiny illustrative program: main :: IO () putStrLn "Try to copy this text" >>=(\_ -> getLine) >>= putStrLn Additional notes: The workaround is pretty simple, launch the program from a .bat script - cmd /K myscript.exe Or from inside an existing cmd.exe session, and the problem goes away. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13329 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13329: Windows CMD.EXE "Quick Edit Mode" -------------------------------------+------------------------------------- Reporter: irongremlin | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: clipboard, | quick edit Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Old description:
Behavior:
When a compiled haskell executable launches into a windows 7 'cmd.exe' terminal session, it does not respect the users 'quick edit mode' setting, and launches with the system default setting instead.
I have not replicated this issue on other versions of windows.
Details: For a description of the feature behavior, see: https://blogs.msdn.microsoft.com/adioltean/2004/12/27/useful-copypaste- trick-in-cmd-exe/
The registry key entry controlling this setting is: HKEY_CURRENT_USER\Console\QuickEdit (1 == on, 0 ==off)
Tiny illustrative program:
main :: IO () putStrLn "Try to copy this text" >>=(\_ -> getLine) >>= putStrLn
Additional notes:
The workaround is pretty simple, launch the program from a .bat script -
cmd /K myscript.exe
Or from inside an existing cmd.exe session, and the problem goes away.
New description: Behavior: When a compiled haskell executable launches into a windows 7 `cmd.exe` terminal session, it does not respect the users `quick edit mode` setting, and launches with the system default setting instead. I have not replicated this issue on other versions of windows. Details: For a description of the feature behavior, see: https://blogs.msdn.microsoft.com/adioltean/2004/12/27/useful-copypaste- trick-in-cmd-exe/ The registry key entry controlling this setting is: `HKEY_CURRENT_USER\Console\QuickEdit` (1 == on, 0 ==off) Tiny illustrative program: {{{ main :: IO () main = putStrLn "Try to copy this text" >>=(\_ -> getLine) >>= putStrLn }}} Additional notes: The workaround is pretty simple, launch the program from a `.bat` script - {{{ cmd /K myscript.exe }}} Or from inside an existing `cmd.exe` session, and the problem goes away. -- Comment (by Phyx-): Thanks for the report, I'll look into this soon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13329#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13329: Windows CMD.EXE "Quick Edit Mode" -------------------------------------+------------------------------------- Reporter: irongremlin | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: clipboard, | quick edit Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): We don't seem to do anything that should be causing this issue in GHC itself. This is likely related to something in MingW-w64's CRT0, though I have yet to confirm this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13329#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC